Change 14253 by ams@lustre on 2002/01/14 03:15:05

           Subject: Re: [ID 20020113.006] Cwd.pm uses uninitialized $ENV{PATH}
           From: Michael G Schwern <[EMAIL PROTECTED]>
           Date: Sun, 13 Jan 2002 21:00:07 -0500
           Message-Id: <20020114020007.GB2877@blackrider>

Affected files ...

.... //depot/perl/lib/Cwd.pm#58 edit

Differences ...

==== //depot/perl/lib/Cwd.pm#58 (text) ====
Index: perl/lib/Cwd.pm
--- perl/lib/Cwd.pm.~1~ Sun Jan 13 20:30:07 2002
+++ perl/lib/Cwd.pm     Sun Jan 13 20:30:07 2002
@@ -200,7 +200,9 @@
 
 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 {
End of Patch.

Reply via email to