diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm index 6a1d2f17ee57..4a9c786c1c3c 100644 --- a/dist/PathTools/Cwd.pm +++ b/dist/PathTools/Cwd.pm @@ -3,7 +3,7 @@ use strict; use Exporter; -our $VERSION = '3.80'; +our $VERSION = '3.81'; my $xs_version = $VERSION; $VERSION =~ tr/_//d; @@ -181,12 +181,6 @@ if ($^O =~ /android/) { } my $found_pwd_cmd = defined($pwd_cmd); -unless ($pwd_cmd) { - # Isn't this wrong? _backtick_pwd() will fail if someone has - # pwd in their path but it is not /bin/pwd or /usr/bin/pwd? - # See [perl #16774]. --jhi - $pwd_cmd = 'pwd'; -} # Lazy-load Carp sub _carp { require Carp; Carp::carp(@_) } @@ -213,26 +207,13 @@ sub _backtick_pwd { # we take care not to override an existing definition for cwd(). 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} || ':'; - my $os = $^O; # Protect $^O from tainting - - - # Try again to find a pwd, this time searching the whole PATH. - if (defined $ENV{PATH} and $os ne 'MSWin32') { # no pwd on Windows - my @candidates = split($sep, $ENV{PATH}); - while (!$found_pwd_cmd and @candidates) { - my $candidate = shift @candidates; - $found_pwd_cmd = 1 if -x "$candidate/pwd"; - } - } - if( $found_pwd_cmd ) { *cwd = \&_backtick_pwd; } else { - *cwd = \&getcwd; + # getcwd() might have an empty prototype + *cwd = sub { getcwd(); }; } } diff --git a/dist/PathTools/lib/File/Spec.pm b/dist/PathTools/lib/File/Spec.pm index 30d883b61b3e..fe738acf58bd 100644 --- a/dist/PathTools/lib/File/Spec.pm +++ b/dist/PathTools/lib/File/Spec.pm @@ -2,7 +2,7 @@ package File::Spec; use strict; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; my %module = ( diff --git a/dist/PathTools/lib/File/Spec/AmigaOS.pm b/dist/PathTools/lib/File/Spec/AmigaOS.pm index fd9da81cdf5a..1398379ca57c 100644 --- a/dist/PathTools/lib/File/Spec/AmigaOS.pm +++ b/dist/PathTools/lib/File/Spec/AmigaOS.pm @@ -3,7 +3,7 @@ package File::Spec::AmigaOS; use strict; require File::Spec::Unix; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; our @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Cygwin.pm b/dist/PathTools/lib/File/Spec/Cygwin.pm index 953c23361a10..55d551ce0663 100644 --- a/dist/PathTools/lib/File/Spec/Cygwin.pm +++ b/dist/PathTools/lib/File/Spec/Cygwin.pm @@ -3,7 +3,7 @@ package File::Spec::Cygwin; use strict; require File::Spec::Unix; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; our @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Epoc.pm b/dist/PathTools/lib/File/Spec/Epoc.pm index fcb9e894e33c..4cde744231aa 100644 --- a/dist/PathTools/lib/File/Spec/Epoc.pm +++ b/dist/PathTools/lib/File/Spec/Epoc.pm @@ -2,7 +2,7 @@ package File::Spec::Epoc; use strict; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; require File::Spec::Unix; diff --git a/dist/PathTools/lib/File/Spec/Functions.pm b/dist/PathTools/lib/File/Spec/Functions.pm index e14ad2f74538..4b3d7bbde130 100644 --- a/dist/PathTools/lib/File/Spec/Functions.pm +++ b/dist/PathTools/lib/File/Spec/Functions.pm @@ -3,7 +3,7 @@ package File::Spec::Functions; use File::Spec; use strict; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; require Exporter; diff --git a/dist/PathTools/lib/File/Spec/Mac.pm b/dist/PathTools/lib/File/Spec/Mac.pm index 8026edcb1261..51d00a01f6f7 100644 --- a/dist/PathTools/lib/File/Spec/Mac.pm +++ b/dist/PathTools/lib/File/Spec/Mac.pm @@ -4,7 +4,7 @@ use strict; use Cwd (); require File::Spec::Unix; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; our @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/OS2.pm b/dist/PathTools/lib/File/Spec/OS2.pm index 3c35ba99b48a..57d67ba01e93 100644 --- a/dist/PathTools/lib/File/Spec/OS2.pm +++ b/dist/PathTools/lib/File/Spec/OS2.pm @@ -4,7 +4,7 @@ use strict; use Cwd (); require File::Spec::Unix; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; our @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Unix.pm b/dist/PathTools/lib/File/Spec/Unix.pm index c06d18f46819..df98f580c3ea 100644 --- a/dist/PathTools/lib/File/Spec/Unix.pm +++ b/dist/PathTools/lib/File/Spec/Unix.pm @@ -3,7 +3,7 @@ package File::Spec::Unix; use strict; use Cwd (); -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; =head1 NAME diff --git a/dist/PathTools/lib/File/Spec/VMS.pm b/dist/PathTools/lib/File/Spec/VMS.pm index 9b78c8b4bc6e..bbff3ad7d807 100644 --- a/dist/PathTools/lib/File/Spec/VMS.pm +++ b/dist/PathTools/lib/File/Spec/VMS.pm @@ -4,7 +4,7 @@ use strict; use Cwd (); require File::Spec::Unix; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; our @ISA = qw(File::Spec::Unix); diff --git a/dist/PathTools/lib/File/Spec/Win32.pm b/dist/PathTools/lib/File/Spec/Win32.pm index 153744202338..b38419cdf1a6 100644 --- a/dist/PathTools/lib/File/Spec/Win32.pm +++ b/dist/PathTools/lib/File/Spec/Win32.pm @@ -5,7 +5,7 @@ use strict; use Cwd (); require File::Spec::Unix; -our $VERSION = '3.80'; +our $VERSION = '3.81'; $VERSION =~ tr/_//d; our @ISA = qw(File::Spec::Unix);