summaryrefslogtreecommitdiff
path: root/lib/File/Spec/Unix.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/File/Spec/Unix.pm')
-rw-r--r--lib/File/Spec/Unix.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm
index d9615c06b4..fb8ee98d8e 100644
--- a/lib/File/Spec/Unix.pm
+++ b/lib/File/Spec/Unix.pm
@@ -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;
@@ -234,8 +235,8 @@ sub join {
($volume,$directories,$file) = File::Spec->splitpath( $path );
($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file );
-Splits a path in to volume, directory, and filename portions. On systems
-with no concept of volume, returns undef for volume.
+Splits a path into volume, directory, and filename portions. On systems
+with no concept of volume, returns '' for volume.
For systems with no syntax differentiating filenames from directories,
assumes that the last file is a path unless $no_file is true or a