diff options
author | Ilya Zakharevich <ilya@math.ohio-state.edu> | 1996-10-09 22:32:22 -0400 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-10-09 22:32:22 -0400 |
commit | 5ce853d76373df289e21c741af7ecec23e8dac4d (patch) | |
tree | ff9c984c806d53d3873e474b8ed9332292b4ab26 /lib/Cwd.pm | |
parent | a2a3efe7cfa0c88c91343f698557ba850af3369e (diff) | |
download | perl-5ce853d76373df289e21c741af7ecec23e8dac4d.tar.gz |
perl 5.003_07: lib/Cwd.pm
Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Use builtin methods if present under OS/2 (maybe should be
done outside of OS/2 too?).
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r-- | lib/Cwd.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index e4e94b3064..83b472cf6a 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('',<DATA>) || die $@; # quick test |