This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix [perl #18666] (taking the more conservative approach).
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 29 Dec 2002 00:51:29 +0000 (00:51 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 29 Dec 2002 00:51:29 +0000 (00:51 +0000)
p4raw-id: //depot/maint-5.8/perl@18362

lib/File/Spec/Unix.pm

index d9615c0..2f45b5e 100644 (file)
@@ -213,6 +213,7 @@ Takes no argument, returns the environment variable PATH as an array.
 =cut
 
 sub path {
+    return () unless exists $ENV{PATH};
     my @path = split(':', $ENV{PATH});
     foreach (@path) { $_ = '.' if $_ eq '' }
     return @path;