summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2005-09-28 08:23:01 +0000
committerSteve Hay <SteveHay@planit.com>2005-09-28 08:23:01 +0000
commit092026cff08d8963457599a8f6395bd1f642aed4 (patch)
tree851d3cbeabb09ff43630bf50f643fab8241eb777 /lib/File
parent7dc108d184319beaec63e84f17c3ede08e5e7abc (diff)
downloadperl-092026cff08d8963457599a8f6395bd1f642aed4.tar.gz
Improve File::Spec::Win32->path() and fix MM_Win32.t
Subject: Improved File::Spec::Win32->path [PATCH] From: Gisle Aas <gisle@ActiveState.com> Date: 17 Sep 2005 00:13:41 -0700 Message-ID: <lrk6hgrwt6.fsf@caliper.activestate.com> Subject: Re: Improved File::Spec::Win32->path [PATCH] From: Michael G Schwern <schwern@pobox.com> Date: Tue, 27 Sep 2005 13:05:54 -0700 Message-ID: <20050927200554.GC20908@windhund.schwern.org> p4raw-id: //depot/perl@25627
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/Spec/Win32.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm
index 94094f0fd7..2981ff9f2a 100644
--- a/lib/File/Spec/Win32.pm
+++ b/lib/File/Spec/Win32.pm
@@ -5,7 +5,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '1.5';
+$VERSION = '1.5_01';
@ISA = qw(File::Spec::Unix);
@@ -108,9 +108,10 @@ sub catdir {
}
sub path {
- my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
- my @path = split(';',$path);
- foreach (@path) { $_ = '.' if $_ eq '' }
+ my @path = split(';', $ENV{PATH});
+ s/"//g for @path;
+ @path = grep length, @path;
+ unshift(@path, ".");
return @path;
}