xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/lib/File/Spec/Functions.pm (revision 0:68f95e015346)
1package File::Spec::Functions;
2
3use File::Spec;
4use strict;
5
6use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
7
8$VERSION = '1.3';
9
10require Exporter;
11
12@ISA = qw(Exporter);
13
14@EXPORT = qw(
15	canonpath
16	catdir
17	catfile
18	curdir
19	rootdir
20	updir
21	no_upwards
22	file_name_is_absolute
23	path
24);
25
26@EXPORT_OK = qw(
27	devnull
28	tmpdir
29	splitpath
30	splitdir
31	catpath
32	abs2rel
33	rel2abs
34	case_tolerant
35);
36
37%EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
38
39foreach my $meth (@EXPORT, @EXPORT_OK) {
40    my $sub = File::Spec->can($meth);
41    no strict 'refs';
42    *{$meth} = sub {&$sub('File::Spec', @_)};
43}
44
45
461;
47__END__
48
49=head1 NAME
50
51File::Spec::Functions - portably perform operations on file names
52
53=head1 SYNOPSIS
54
55	use File::Spec::Functions;
56	$x = catfile('a','b');
57
58=head1 DESCRIPTION
59
60This module exports convenience functions for all of the class methods
61provided by File::Spec.
62
63For a reference of available functions, please consult L<File::Spec::Unix>,
64which contains the entire set, and which is inherited by the modules for
65other platforms. For further information, please see L<File::Spec::Mac>,
66L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>.
67
68=head2 Exports
69
70The following functions are exported by default.
71
72	canonpath
73	catdir
74	catfile
75	curdir
76	rootdir
77	updir
78	no_upwards
79	file_name_is_absolute
80	path
81
82
83The following functions are exported only by request.
84
85	devnull
86	tmpdir
87	splitpath
88	splitdir
89	catpath
90	abs2rel
91	rel2abs
92	case_tolerant
93
94All the functions may be imported using the C<:ALL> tag.
95
96=head1 SEE ALSO
97
98File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2,
99File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker
100