From: Jarkko Hietaniemi Date: Fri, 21 Sep 2001 17:52:28 +0000 (+0000) Subject: More Cwd from Schwern: make also OS/2 and DOS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cade0c02de13e52be76bdb1f796759b43676baa2;p=p5sagit%2Fp5-mst-13.2.git More Cwd from Schwern: make also OS/2 and DOS 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 --- diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 9602919..0a1b2b8 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -437,7 +437,6 @@ sub _vms_abs_path { sub _os2_cwd { $ENV{'PWD'} = `cmd /c cd`; chop $ENV{'PWD'}; - $ENV{'PWD'} =~ s:\\:/:g ; return $ENV{'PWD'}; } @@ -455,7 +454,6 @@ sub _dos_cwd { if (!defined &Dos::GetCwd) { $ENV{'PWD'} = `command /c cd`; chop $ENV{'PWD'}; - $ENV{'PWD'} =~ s:\\:/:g ; } else { $ENV{'PWD'} = Dos::GetCwd(); } @@ -498,6 +496,7 @@ sub _epoc_cwd { *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