diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-06 15:37:30 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-06 15:37:30 +0000 |
commit | 605986241de3d828e4de2beec37dc9ecc5aaa260 (patch) | |
tree | 4e4c7758c4d45004e25d2c72a576e251302cd58b /lib/Cwd.pm | |
parent | 86d86cadad68b71393e3371f0e467c29982578f9 (diff) | |
download | perl-605986241de3d828e4de2beec37dc9ecc5aaa260.tar.gz |
Upgrade to PathTools 3.07
p4raw-id: //depot/perl@24407
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r-- | lib/Cwd.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 002b7c1183..15525dab42 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -170,7 +170,7 @@ use strict; use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); -$VERSION = '3.05'; +$VERSION = '3.07'; @ISA = qw/ Exporter /; @EXPORT = qw(cwd getcwd fastcwd fastgetcwd); @@ -330,8 +330,9 @@ sub _backtick_pwd { unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) { # The pwd command is not available in some chroot(2)'ed environments my $sep = $Config::Config{path_sep} || ':'; - if( $^O eq 'MacOS' || (defined $ENV{PATH} && - $^O ne 'MSWin32' && # no pwd on Windows + my $os = $^O; # Protect $^O from tainting + if( $os eq 'MacOS' || (defined $ENV{PATH} && + $os ne 'MSWin32' && # no pwd on Windows grep { -x "$_/pwd" } split($sep, $ENV{PATH})) ) { *cwd = \&_backtick_pwd; |