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