use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-$VERSION = '3.56';
+$VERSION = '3.57';
my $xs_version = $VERSION;
$VERSION =~ tr/_//;
}
sub _os2_cwd {
- $ENV{'PWD'} = `cmd /c cd`;
- chomp $ENV{'PWD'};
- $ENV{'PWD'} =~ s:\\:/:g ;
- return $ENV{'PWD'};
+ my $pwd = `cmd /c cd`;
+ chomp $pwd;
+ $pwd =~ s:\\:/:g ;
+ $ENV{'PWD'} = $pwd;
+ return $pwd;
}
sub _win32_cwd_simple {
- $ENV{'PWD'} = `cd`;
- chomp $ENV{'PWD'};
- $ENV{'PWD'} =~ s:\\:/:g ;
- return $ENV{'PWD'};
+ my $pwd = `cd`;
+ chomp $pwd;
+ $pwd =~ s:\\:/:g ;
+ $ENV{'PWD'} = $pwd;
+ return $pwd;
}
sub _win32_cwd {
+ my $pwd;
# Need to avoid taking any sort of reference to the typeglob or the code in
# the optree, so that this tests the runtime state of things, as the
# ExtUtils::MakeMaker tests for "miniperl" need to be able to fake things at
# problems (for reasons that we haven't been able to get to the bottom of -
# rt.cpan.org #56225)
if (*{$DynaLoader::{boot_DynaLoader}}{CODE}) {
- $ENV{'PWD'} = Win32::GetCwd();
+ $pwd = Win32::GetCwd();
}
else { # miniperl
- chomp($ENV{'PWD'} = `cd`);
+ chomp($pwd = `cd`);
}
- $ENV{'PWD'} =~ s:\\:/:g ;
- return $ENV{'PWD'};
+ $pwd =~ s:\\:/:g ;
+ $ENV{'PWD'} = $pwd;
+ return $pwd;
}
*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_win32_cwd_simple;
sub _dos_cwd {
+ my $pwd;
if (!defined &Dos::GetCwd) {
- $ENV{'PWD'} = `command /c cd`;
- chomp $ENV{'PWD'};
- $ENV{'PWD'} =~ s:\\:/:g ;
+ chomp($pwd = `command /c cd`);
+ $pwd =~ s:\\:/:g ;
} else {
- $ENV{'PWD'} = Dos::GetCwd();
+ $pwd = Dos::GetCwd();
}
- return $ENV{'PWD'};
+ $ENV{'PWD'} = $pwd;
+ return $pwd;
}
sub _qnx_cwd {
local $ENV{PATH} = '';
local $ENV{CDPATH} = '';
local $ENV{ENV} = '';
- $ENV{'PWD'} = `/usr/bin/fullpath -t`;
- chomp $ENV{'PWD'};
- return $ENV{'PWD'};
+ my $pwd = `/usr/bin/fullpath -t`;
+ chomp $pwd;
+ $ENV{'PWD'} = $pwd;
+ return $pwd;
}
sub _qnx_abs_path {
}
sub _epoc_cwd {
- $ENV{'PWD'} = EPOC::getcwd();
- return $ENV{'PWD'};
+ return $ENV{'PWD'} = EPOC::getcwd();
}