Commit | Line | Data |
5c609535 |
1 | package File::Spec::Functions; |
2 | |
3 | use File::Spec; |
4 | use strict; |
5 | |
07824bd1 |
6 | use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); |
b4296952 |
7 | |
07824bd1 |
8 | $VERSION = '1.3'; |
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 |
e021ab8e |
34 | case_tolerant |
5c609535 |
35 | ); |
36 | |
817e423a |
37 | %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] ); |
38 | |
f505c983 |
39 | foreach my $meth (@EXPORT, @EXPORT_OK) { |
40 | my $sub = File::Spec->can($meth); |
5c609535 |
41 | no strict 'refs'; |
f505c983 |
42 | *{$meth} = sub {&$sub('File::Spec', @_)}; |
5c609535 |
43 | } |
44 | |
45 | |
46 | 1; |
47 | __END__ |
48 | |
49 | =head1 NAME |
50 | |
51 | File::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 | |
60 | This module exports convenience functions for all of the class methods |
61 | provided by File::Spec. |
62 | |
63 | For a reference of available functions, please consult L<File::Spec::Unix>, |
64 | which contains the entire set, and which is inherited by the modules for |
65 | other platforms. For further information, please see L<File::Spec::Mac>, |
66 | L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>. |
67 | |
68 | =head2 Exports |
69 | |
70 | The following functions are exported by default. |
71 | |
72 | canonpath |
73 | catdir |
74 | catfile |
75 | curdir |
5c609535 |
76 | rootdir |
5c609535 |
77 | updir |
78 | no_upwards |
79 | file_name_is_absolute |
80 | path |
f505c983 |
81 | |
82 | |
83 | The following functions are exported only by request. |
84 | |
85 | devnull |
86 | tmpdir |
5c609535 |
87 | splitpath |
88 | splitdir |
89 | catpath |
90 | abs2rel |
91 | rel2abs |
e021ab8e |
92 | case_tolerant |
5c609535 |
93 | |
817e423a |
94 | All the functions may be imported using the C<:ALL> tag. |
95 | |
99f36a73 |
96 | =head1 COPYRIGHT |
97 | |
98 | Copyright (c) 2004 by the Perl 5 Porters. All rights reserved. |
99 | |
100 | This program is free software; you can redistribute it and/or modify |
101 | it under the same terms as Perl itself. |
102 | |
5c609535 |
103 | =head1 SEE ALSO |
104 | |
105 | File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, |
106 | File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker |
99f36a73 |
107 | |
108 | =cut |
109 | |