Skip to content

Commit

Permalink
Merge e725e6c into f212efc
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed May 15, 2021
2 parents f212efc + e725e6c commit eeb2e77
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 32 deletions.
25 changes: 3 additions & 22 deletions dist/PathTools/Cwd.pm
Expand Up @@ -3,7 +3,7 @@ use strict;
use Exporter;


our $VERSION = '3.80';
our $VERSION = '3.81';
my $xs_version = $VERSION;
$VERSION =~ tr/_//d;

Expand Down Expand Up @@ -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(@_) }
Expand All @@ -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(); };
}
}

Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec.pm
Expand Up @@ -2,7 +2,7 @@ package File::Spec;

use strict;

our $VERSION = '3.80';
our $VERSION = '3.81';
$VERSION =~ tr/_//d;

my %module = (
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/AmigaOS.pm
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Cygwin.pm
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Epoc.pm
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Functions.pm
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Mac.pm
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/OS2.pm
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Unix.pm
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/VMS.pm
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Win32.pm
Expand Up @@ -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);
Expand Down

0 comments on commit eeb2e77

Please sign in to comment.