All the authors of these modules have now been contacted;
[p5sagit/p5-mst-13.2.git] / lib / File / Spec.pm
index 19475c0..c43576b 100644 (file)
@@ -1,17 +1,22 @@
 package File::Spec;
 
 use strict;
-our(@ISA, $VERSION);
+use vars qw(@ISA $VERSION);
 
-$VERSION = 0.82 ;
+$VERSION = '0.86';
 
 my %module = (MacOS   => 'Mac',
              MSWin32 => 'Win32',
              os2     => 'OS2',
              VMS     => 'VMS',
-             epoc    => 'Epoc');
+             epoc    => 'Epoc',
+             NetWare => 'Win32', # Yes, File::Spec::Win32 works on NetWare.
+              dos     => 'OS2',   # Yes, File::Spec::OS2 works on DJGPP.
+             cygwin  => 'Cygwin');
+
 
 my $module = $module{$^O} || 'Unix';
+
 require "File/Spec/$module.pm";
 @ISA = ("File::Spec::$module");
 
@@ -59,7 +64,7 @@ File::Spec. Since some modules (like VMS) make use of facilities available
 only under that OS, it may not be possible to load all modules under all
 operating systems.
 
-Since File::Spec is object oriented, subroutines should not called directly,
+Since File::Spec is object oriented, subroutines should not be called directly,
 as in:
 
        File::Spec::catfile('a','b');
@@ -120,10 +125,10 @@ Returns a string representation of the root directory.
 =item tmpdir
 
 Returns a string representation of the first writable directory from a
-list of possible temporary directories.  Returns "" if no writable
-temporary directories are found.  The list of directories checked
-depends on the platform; e.g. File::Spec::Unix checks $ENV{TMPDIR} and
-/tmp.
+list of possible temporary directories.  Returns the current directory
+if no writable temporary directories are found.  The list of directories
+checked depends on the platform; e.g. File::Spec::Unix checks $ENV{TMPDIR}
+(unless taint is on) and /tmp.
 
     $tmpdir = File::Spec->tmpdir();
 
@@ -153,10 +158,9 @@ Takes as argument a path and returns true if it is an absolute path.
 
     $is_absolute = File::Spec->file_name_is_absolute( $path );
 
-This does not consult the local filesystem on Unix, Win32, or OS/2.  It
-does sometimes on MacOS (see L<File::Spec::MacOS/file_name_is_absolute>).
-It does consult the working environment for VMS (see
-L<File::Spec::VMS/file_name_is_absolute>).
+This does not consult the local filesystem on Unix, Win32, OS/2, or
+Mac OS (Classic).  It does consult the working environment for VMS
+(see L<File::Spec::VMS/file_name_is_absolute>).
 
 =item path
 
@@ -171,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 );
@@ -198,12 +202,12 @@ files from directories.
 
 Unlike just splitting the directories on the separator, empty
 directory names (C<''>) can be returned, because these are significant
-on some OSs (e.g. MacOS).
+on some OSs.
 
-=item catpath
+=item catpath()
 
 Takes volume, directory and file portions and returns an entire path. Under
-Unix, $volume is ignored, and directory and file are catenated.  A '/' is
+Unix, $volume is ignored, and directory and file are concatenated.  A '/' is
 inserted if need be.  On other OSs, $volume is significant.
 
     $full_path = File::Spec->catpath( $volume, $directory, $file );
@@ -216,9 +220,9 @@ from the base path to the destination path:
     $rel_path = File::Spec->abs2rel( $path ) ;
     $rel_path = File::Spec->abs2rel( $path, $base ) ;
 
-If $base is not present or '', then L<cwd()> is used. If $base is relative, 
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative, 
 then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
 
 On systems with the concept of a volume, this assumes that both paths 
 are on the $destination volume, and ignores the $base volume. 
@@ -228,26 +232,24 @@ $base filename as well. Otherwise all path components are assumed to be
 directories.
 
 If $path is relative, it is converted to absolute form using L</rel2abs()>.
-This means that it is taken to be relative to L<cwd()>.
+This means that it is taken to be relative to L<cwd()|Cwd>.
 
-No checks against the filesystem are made on most systems.  On MacOS,
-the filesystem may be consulted (see
-L<File::Spec::MacOS/file_name_is_absolute>).  On VMS, there is
+No checks against the filesystem are made.  On VMS, there is
 interaction with the working environment, as logicals and
 macros are expanded.
 
 Based on code written by Shigio Yamaguchi.
 
-=item rel2abs
+=item rel2abs()
 
 Converts a relative path to an absolute path. 
 
     $abs_path = File::Spec->rel2abs( $path ) ;
     $abs_path = File::Spec->rel2abs( $path, $base ) ;
 
-If $base is not present or '', then L<cwd()> is used. If $base is relative, 
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative, 
 then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
 
 On systems with the concept of a volume, this assumes that both paths 
 are on the $base volume, and ignores the $path volume. 
@@ -258,9 +260,7 @@ directories.
 
 If $path is absolute, it is cleaned up and returned using L</canonpath()>.
 
-No checks against the filesystem are made on most systems.  On MacOS,
-the filesystem may be consulted (see
-L<File::Spec::MacOS/file_name_is_absolute>).  On VMS, there is
+No checks against the filesystem are made.  On VMS, there is
 interaction with the working environment, as logicals and
 macros are expanded.
 
@@ -281,11 +281,14 @@ L<ExtUtils::MakeMaker>
 =head1 AUTHORS
 
 Kenneth Albanowski <kjahds@kjahds.com>, Andy Dougherty
-<doughera@lafcol.lafayette.edu>, Andreas KE<ouml>nig
-<A.Koenig@franz.ww.TU-Berlin.DE>, Tim Bunce <Tim.Bunce@ig.co.uk. VMS
-support by Charles Bailey <bailey@newman.upenn.edu>.  OS/2 support by
-Ilya Zakharevich <ilya@math.ohio-state.edu>. Mac support by Paul Schinder
-<schinder@pobox.com>.  abs2rel() and rel2abs() written by
-Shigio Yamaguchi <shigio@tamacom.com>, modified by Barrie Slaymaker
-<barries@slaysys.com>.  splitpath(), splitdir(), catpath() and catdir()
-by Barrie Slaymaker.
+<doughera@lafayette.edu>, Andreas KE<ouml>nig
+<A.Koenig@franz.ww.TU-Berlin.DE>, Tim Bunce <Tim.Bunce@ig.co.uk.
+VMS support by Charles Bailey <bailey@newman.upenn.edu>.
+OS/2 support by Ilya Zakharevich <ilya@math.ohio-state.edu>.
+Mac support by Paul Schinder <schinder@pobox.com>, and Thomas Wegner
+<wegner_thomas@yahoo.com>.  abs2rel() and rel2abs() written by Shigio
+Yamaguchi <shigio@tamacom.com>, modified by Barrie Slaymaker
+<barries@slaysys.com>.  splitpath(), splitdir(), catpath() and
+catdir() by Barrie Slaymaker.
+
+=cut