This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a37c3bb
)
Re: [ID 20020113.006] Cwd.pm uses uninitialized $ENV{PATH}
author
Michael G. Schwern
<schwern@pobox.com>
Sun, 13 Jan 2002 21:00:07 +0000
(16:00 -0500)
committer
Abhijit Menon-Sen
<ams@wiw.org>
Mon, 14 Jan 2002 03:15:05 +0000
(
03:15
+0000)
Message-Id: <
20020114020007
.GB2877@blackrider>
p4raw-id: //depot/perl@14253
lib/Cwd.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Cwd.pm
b/lib/Cwd.pm
index
63a14fd
..
0db9410
100644
(file)
--- a/
lib/Cwd.pm
+++ b/
lib/Cwd.pm
@@
-200,7
+200,9
@@
sub _backtick_pwd {
unless(defined &cwd) {
# The pwd command is not available in some chroot(2)'ed environments
- if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {
+ if( $^O eq 'MacOS' || (defined $ENV{PATH} &&
+ grep { -x "$_/pwd" } split(':', $ENV{PATH})) )
+ {
*cwd = \&_backtick_pwd;
}
else {