addendum to change#4136 (from Robin Barker <rmb1@cise.npl.co.uk>)
[p5sagit/p5-mst-13.2.git] / lib / File / Spec / Functions.pm
CommitLineData
5c609535 1package File::Spec::Functions;
2
3use File::Spec;
4use strict;
5
f505c983 6use vars qw(@ISA @EXPORT @EXPORT_OK);
5c609535 7
8require Exporter;
9
10@ISA = qw(Exporter);
11
12@EXPORT = qw(
13 canonpath
14 catdir
15 catfile
16 curdir
5c609535 17 rootdir
5c609535 18 updir
19 no_upwards
20 file_name_is_absolute
21 path
f505c983 22);
23
24@EXPORT_OK = qw(
25 devnull
26 tmpdir
5c609535 27 splitpath
28 splitdir
29 catpath
30 abs2rel
31 rel2abs
32);
33
f505c983 34foreach my $meth (@EXPORT, @EXPORT_OK) {
35 my $sub = File::Spec->can($meth);
5c609535 36 no strict 'refs';
f505c983 37 *{$meth} = sub {&$sub('File::Spec', @_)};
5c609535 38}
39
40
411;
42__END__
43
44=head1 NAME
45
46File::Spec::Functions - portably perform operations on file names
47
48=head1 SYNOPSIS
49
50 use File::Spec::Functions;
51 $x = catfile('a','b');
52
53=head1 DESCRIPTION
54
55This module exports convenience functions for all of the class methods
56provided by File::Spec.
57
58For a reference of available functions, please consult L<File::Spec::Unix>,
59which contains the entire set, and which is inherited by the modules for
60other platforms. For further information, please see L<File::Spec::Mac>,
61L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
62
63=head2 Exports
64
65The following functions are exported by default.
66
67 canonpath
68 catdir
69 catfile
70 curdir
5c609535 71 rootdir
5c609535 72 updir
73 no_upwards
74 file_name_is_absolute
75 path
f505c983 76
77
78The following functions are exported only by request.
79
80 devnull
81 tmpdir
5c609535 82 splitpath
83 splitdir
84 catpath
85 abs2rel
86 rel2abs
87
88=head1 SEE ALSO
89
90File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2,
91File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker