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");
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');
=over 2
-=item canonpath()
+=item canonpath
No physical check on the filesystem, but a logical cleanup of a
path.
$cpath = File::Spec->canonpath( $path ) ;
-=item catdir()
+=item catdir
Concatenate two or more directory names to form a complete path ending
with a directory. But remove the trailing slash from the resulting
$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
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()
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()|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.
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.
=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.