This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More Cwd from Schwern: make also OS/2 and DOS
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 21 Sep 2001 17:52:28 +0000 (17:52 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 21 Sep 2001 17:52:28 +0000 (17:52 +0000)
Cwd agree with File::Spec (that is, native path
syntax using \ instead of / -- backward compatibility
polic warning) and stop Win32 from using bsd_realpath().

p4raw-id: //depot/perl@12116

lib/Cwd.pm

index 9602919..0a1b2b8 100644 (file)
@@ -437,7 +437,6 @@ sub _vms_abs_path {
 sub _os2_cwd {
     $ENV{'PWD'} = `cmd /c cd`;
     chop $ENV{'PWD'};
 sub _os2_cwd {
     $ENV{'PWD'} = `cmd /c cd`;
     chop $ENV{'PWD'};
-    $ENV{'PWD'} =~ s:\\:/:g ;
     return $ENV{'PWD'};
 }
 
     return $ENV{'PWD'};
 }
 
@@ -455,7 +454,6 @@ sub _dos_cwd {
     if (!defined &Dos::GetCwd) {
         $ENV{'PWD'} = `command /c cd`;
         chop $ENV{'PWD'};
     if (!defined &Dos::GetCwd) {
         $ENV{'PWD'} = `command /c cd`;
         chop $ENV{'PWD'};
-        $ENV{'PWD'} =~ s:\\:/:g ;
     } else {
         $ENV{'PWD'} = Dos::GetCwd();
     }
     } else {
         $ENV{'PWD'} = Dos::GetCwd();
     }
@@ -498,6 +496,7 @@ sub _epoc_cwd {
         *fastcwd       = \&_NT_cwd;
         *fastgetcwd    = \&_NT_cwd;
         *abs_path      = \&fast_abs_path;
         *fastcwd       = \&_NT_cwd;
         *fastgetcwd    = \&_NT_cwd;
         *abs_path      = \&fast_abs_path;
+        *realpath   = \&fast_abs_path;
     }
     elsif ($^O eq 'os2') {
         # sys_cwd may keep the builtin command
     }
     elsif ($^O eq 'os2') {
         # sys_cwd may keep the builtin command