diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-08-30 01:22:51 +0300 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-09-04 11:21:57 +0000 |
commit | 522b859adcc800ddbbe593fba580633bb305644f (patch) | |
tree | 27ac7ca00d33e07f829531d80821230b1f1a0bd7 /lib/Cwd.pm | |
parent | c38ddbc4365cf58ed4e3957d38c67381b8f863be (diff) | |
download | perl-522b859adcc800ddbbe593fba580633bb305644f.tar.gz |
OS/400 PASE port
Message-ID: <20020829192251.GA27102@lyta.hut.fi>
p4raw-id: //depot/perl@17827
Diffstat (limited to 'lib/Cwd.pm')
-rw-r--r-- | lib/Cwd.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 8b00543e1e..7f8ef6543b 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -192,7 +192,16 @@ foreach my $try (qw(/bin/pwd /usr/bin/pwd)) { last; } } -$pwd_cmd ||= 'pwd'; +unless ($pwd_cmd) { + if (-x '/QOpenSys/bin/pwd') { # OS/400 PASE. + $pwd_cmd = '/QOpenSys/bin/pwd' ; + } else { + # Isn't this wrong? _backtick_pwd() will fail if somenone has + # pwd in their path but it is not /bin/pwd or /usr/bin/pwd? + # See [perl #16774]. --jhi + $pwd_cmd = 'pwd'; + } +} # The 'natural and safe form' for UNIX (pwd may be setuid root) sub _backtick_pwd { |