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 | |
4a4ab19c |
8 | $VERSION = '3.28_03'; |
486bcc50 |
9 | $VERSION = eval $VERSION; |
5c609535 |
10 | |
11 | require Exporter; |
12 | |
13 | @ISA = qw(Exporter); |
14 | |
15 | @EXPORT = qw( |
16 | canonpath |
17 | catdir |
18 | catfile |
19 | curdir |
5c609535 |
20 | rootdir |
5c609535 |
21 | updir |
22 | no_upwards |
23 | file_name_is_absolute |
24 | path |
f505c983 |
25 | ); |
26 | |
27 | @EXPORT_OK = qw( |
28 | devnull |
29 | tmpdir |
5c609535 |
30 | splitpath |
31 | splitdir |
32 | catpath |
33 | abs2rel |
34 | rel2abs |
e021ab8e |
35 | case_tolerant |
5c609535 |
36 | ); |
37 | |
817e423a |
38 | %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] ); |
39 | |
f505c983 |
40 | foreach my $meth (@EXPORT, @EXPORT_OK) { |
41 | my $sub = File::Spec->can($meth); |
5c609535 |
42 | no strict 'refs'; |
f505c983 |
43 | *{$meth} = sub {&$sub('File::Spec', @_)}; |
5c609535 |
44 | } |
45 | |
46 | |
47 | 1; |
48 | __END__ |
49 | |
50 | =head1 NAME |
51 | |
52 | File::Spec::Functions - portably perform operations on file names |
53 | |
54 | =head1 SYNOPSIS |
55 | |
56 | use File::Spec::Functions; |
57 | $x = catfile('a','b'); |
58 | |
59 | =head1 DESCRIPTION |
60 | |
61 | This module exports convenience functions for all of the class methods |
62 | provided by File::Spec. |
63 | |
64 | For a reference of available functions, please consult L<File::Spec::Unix>, |
65 | which contains the entire set, and which is inherited by the modules for |
66 | other platforms. For further information, please see L<File::Spec::Mac>, |
67 | L<File::Spec::OS2>, L<File::Spec::Win32>, or L<File::Spec::VMS>. |
68 | |
69 | =head2 Exports |
70 | |
71 | The following functions are exported by default. |
72 | |
73 | canonpath |
74 | catdir |
75 | catfile |
76 | curdir |
5c609535 |
77 | rootdir |
5c609535 |
78 | updir |
79 | no_upwards |
80 | file_name_is_absolute |
81 | path |
f505c983 |
82 | |
83 | |
84 | The following functions are exported only by request. |
85 | |
86 | devnull |
87 | tmpdir |
5c609535 |
88 | splitpath |
89 | splitdir |
90 | catpath |
91 | abs2rel |
92 | rel2abs |
e021ab8e |
93 | case_tolerant |
5c609535 |
94 | |
817e423a |
95 | All the functions may be imported using the C<:ALL> tag. |
96 | |
99f36a73 |
97 | =head1 COPYRIGHT |
98 | |
99 | Copyright (c) 2004 by the Perl 5 Porters. All rights reserved. |
100 | |
101 | This program is free software; you can redistribute it and/or modify |
102 | it under the same terms as Perl itself. |
103 | |
5c609535 |
104 | =head1 SEE ALSO |
105 | |
106 | File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, |
107 | File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker |
99f36a73 |
108 | |
109 | =cut |
110 | |