From: Rafael Garcia-Suarez Date: Wed, 8 Jan 2003 22:02:26 +0000 (+0000) Subject: Fix the doc for splitpath() in the File::Spec modules : X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=40d020d967675a6decd375f53496ed3aa1c8be01;p=p5sagit%2Fp5-mst-13.2.git Fix the doc for splitpath() in the File::Spec modules : this function doesn't return undef in any case. p4raw-id: //depot/perl@18465 --- diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index d125b2f..e8b4080 100644 --- a/lib/File/Spec.pm +++ b/lib/File/Spec.pm @@ -175,7 +175,7 @@ join is the same as catfile. =item splitpath Splits a path in to volume, directory, and filename portions. On systems -with no concept of volume, returns undef for volume. +with no concept of volume, returns '' for volume. ($volume,$directories,$file) = File::Spec->splitpath( $path ); ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file ); diff --git a/lib/File/Spec/Mac.pm b/lib/File/Spec/Mac.pm index 000da91..6067b3c 100644 --- a/lib/File/Spec/Mac.pm +++ b/lib/File/Spec/Mac.pm @@ -442,7 +442,7 @@ sub path { ($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. +Splits a path into volume, directory, and filename portions. On Mac OS, assumes that the last part of the path is a filename unless $no_file is true or a trailing separator ":" is present. diff --git a/lib/File/Spec/OS2.pm b/lib/File/Spec/OS2.pm index b494e2c..e65186a 100644 --- a/lib/File/Spec/OS2.pm +++ b/lib/File/Spec/OS2.pm @@ -76,10 +76,10 @@ sub canonpath { ($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. Assumes that +Splits a path into volume, directory, and filename portions. Assumes that the last file is a path unless the path ends in '/', '/.', '/..' or $no_file is true. On Win32 this means that $no_file true makes this return -( $volume, $path, undef ). +( $volume, $path, '' ). Separators accepted are \ and /. diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 2f45b5e..fb8ee98 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -235,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 diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 7c22758..87a236b 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -170,10 +170,10 @@ sub canonpath { ($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. Assumes that +Splits a path into volume, directory, and filename portions. Assumes that the last file is a path unless the path ends in '\\', '\\.', '\\..' or $no_file is true. On Win32 this means that $no_file true makes this return -( $volume, $path, undef ). +( $volume, $path, '' ). Separators accepted are \ and /.