Commit | Line | Data |
5c609535 |
1 | package File::Spec::Functions; |
2 | |
3 | use File::Spec; |
4 | use strict; |
5 | |
f505c983 |
6 | use vars qw(@ISA @EXPORT @EXPORT_OK); |
5c609535 |
7 | |
8 | require 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 |
34 | foreach 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 | |
41 | 1; |
42 | __END__ |
43 | |
44 | =head1 NAME |
45 | |
46 | File::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 | |
55 | This module exports convenience functions for all of the class methods |
56 | provided by File::Spec. |
57 | |
58 | For a reference of available functions, please consult L<File::Spec::Unix>, |
59 | which contains the entire set, and which is inherited by the modules for |
60 | other platforms. For further information, please see L<File::Spec::Mac>, |
61 | L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>. |
62 | |
63 | =head2 Exports |
64 | |
65 | The 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 | |
78 | The 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 | |
90 | File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, |
91 | File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker |