summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/t/MM_Win32.t7
-rw-r--r--lib/File/Spec/Win32.pm9
2 files changed, 6 insertions, 10 deletions
diff --git a/lib/ExtUtils/t/MM_Win32.t b/lib/ExtUtils/t/MM_Win32.t
index ca870d5cb0..7acde33a94 100644
--- a/lib/ExtUtils/t/MM_Win32.t
+++ b/lib/ExtUtils/t/MM_Win32.t
@@ -163,15 +163,10 @@ delete $ENV{PATHEXT} unless $had_pathext;
}
# path()
-my $had_path = exists $ENV{PATH};
{
- my @path_eg = ( qw( . .. ), 'C:\\Program Files' );
- local $ENV{PATH} = join ';', @path_eg;
- ok( eq_array( [ $MM->path() ], [ @path_eg ] ),
+ ok( eq_array( [ $MM->path() ], [ File::Spec->path ] ),
'path() [preset]' );
}
-# Bug in Perl. local $ENV{FOO} will not delete key afterwards.
-delete $ENV{PATH} unless $had_path;
# static_lib() should look into that
# dynamic_bs() should look into that
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;
}