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