summaryrefslogtreecommitdiff
path: root/lib/Cwd.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r--lib/Cwd.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index e93cf1a0a9..f924a59647 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -230,6 +230,7 @@ sub chdir {
sub _vms_cwd {
return $ENV{'DEFAULT'}
}
+
sub _os2_cwd {
$ENV{'PWD'} = `cmd /c cd`;
chop $ENV{'PWD'};
@@ -237,6 +238,8 @@ sub _os2_cwd {
return $ENV{'PWD'};
}
+*_NT_cwd = \&_os2_cwd unless defined &_NT_cwd;
+
sub _msdos_cwd {
$ENV{'PWD'} = `command /c cd`;
chop $ENV{'PWD'};
@@ -255,6 +258,7 @@ sub _msdos_cwd {
}
elsif ($^O eq 'NT' or $^O eq 'MSWin32') {
# We assume that &_NT_cwd is defined as an XSUB or in the core.
+ *cwd = \&_NT_cwd;
*getcwd = \&_NT_cwd;
*fastcwd = \&_NT_cwd;
*fastgetcwd = \&_NT_cwd;