Re-integrate mainline
[p5sagit/p5-mst-13.2.git] / lib / File / Spec / Functions.pm
CommitLineData
5c609535 1package File::Spec::Functions;
2
3use File::Spec;
4use strict;
5
5bc28da9 6use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
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
5bc28da9 34%EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
35
f505c983 36foreach my $meth (@EXPORT, @EXPORT_OK) {
37 my $sub = File::Spec->can($meth);
5c609535 38 no strict 'refs';
f505c983 39 *{$meth} = sub {&$sub('File::Spec', @_)};
5c609535 40}
41
42
431;
44__END__
45
46=head1 NAME
47
48File::Spec::Functions - portably perform operations on file names
49
50=head1 SYNOPSIS
51
52 use File::Spec::Functions;
53 $x = catfile('a','b');
54
55=head1 DESCRIPTION
56
57This module exports convenience functions for all of the class methods
58provided by File::Spec.
59
60For a reference of available functions, please consult L<File::Spec::Unix>,
61which contains the entire set, and which is inherited by the modules for
62other platforms. For further information, please see L<File::Spec::Mac>,
63L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
64
65=head2 Exports
66
67The following functions are exported by default.
68
69 canonpath
70 catdir
71 catfile
72 curdir
5c609535 73 rootdir
5c609535 74 updir
75 no_upwards
76 file_name_is_absolute
77 path
f505c983 78
79
80The following functions are exported only by request.
81
82 devnull
83 tmpdir
5c609535 84 splitpath
85 splitdir
86 catpath
87 abs2rel
88 rel2abs
89
5bc28da9 90All the functions may be imported using the C<:ALL> tag.
91
5c609535 92=head1 SEE ALSO
93
94File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2,
95File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker