From: Ilya Zakharevich Date: Thu, 10 Oct 1996 02:32:22 +0000 (-0400) Subject: perl 5.003_07: lib/Cwd.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ce853d76373df289e21c741af7ecec23e8dac4d;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_07: lib/Cwd.pm Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT) From: Ilya Zakharevich Use builtin methods if present under OS/2 (maybe should be done outside of OS/2 too?). --- diff --git a/lib/Cwd.pm b/lib/Cwd.pm index e4e94b3..83b472c 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -254,12 +254,12 @@ elsif ($^O eq 'NT' or $^O eq 'MSWin32') { *fastgetcwd = \&_NT_cwd; } elsif ($^O eq 'os2') { - - *cwd = \&_os2_cwd; - *getcwd = \&_os2_cwd; - *fastgetcwd = \&_os2_cwd; - *fastcwd = \&_os2_cwd; -} + # sys_cwd may keep the builtin command + *cwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd; + *getcwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd; + *fastgetcwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd; + *fastcwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd; + } $^W = $oldw; # package main; eval join('',) || die $@; # quick test