4 use vars qw(@ISA $VERSION);
8 my %module = (MacOS => 'Mac',
13 my $module = $module{$^O} || 'Unix';
14 require "File/Spec/$module.pm";
15 @ISA = ("File::Spec::$module");
22 File::Spec - portably perform operations on file names
28 C<$x=File::Spec-E<gt>catfile('a','b','c');>
30 which returns 'a/b/c' under Unix.
34 This module is designed to support operations commonly performed on file
35 specifications (usually called "file names", but not to be confused with the
36 contents of a file, or Perl's file handles), such as concatenating several
37 directory and file names into a single path, or determining whether a path
38 is rooted. It is based on code directly taken from MakeMaker 5.17, code
39 written by Andreas KE<ouml>nig, Andy Dougherty, Charles Bailey, Ilya
40 Zakharevich, Paul Schinder, and others.
42 Since these functions are different for most operating systems, each set of
43 OS specific routines is available in a separate module, including:
51 The module appropriate for the current OS is automatically loaded by
52 File::Spec. Since some modules (like VMS) make use of OS specific
53 facilities, it may not be possible to load all modules under all operating
56 Since File::Spec is object oriented, subroutines should not called directly,
59 File::Spec::catfile('a','b');
61 but rather as class methods:
63 File::Spec->catfile('a','b');
65 For a reference of available functions, please consult L<File::Spec::Unix>,
66 which contains the entire set, and inherited by the modules for other
67 platforms. For further information, please see L<File::Spec::Mac>,
68 L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
72 File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, File::Spec::Win32,
73 File::Spec::VMS, ExtUtils::MakeMaker
77 Kenneth Albanowski <F<kjahds@kjahds.com>>, Andy Dougherty
78 <F<doughera@lafcol.lafayette.edu>>, Andreas KE<ouml>nig
79 <F<A.Koenig@franz.ww.TU-Berlin.DE>>, Tim Bunce <F<Tim.Bunce@ig.co.uk>>. VMS
80 support by Charles Bailey <F<bailey@newman.upenn.edu>>. OS/2 support by
81 Ilya Zakharevich <F<ilya@math.ohio-state.edu>>. Mac support by Paul Schinder
82 <F<schinder@pobox.com>>.