Upgrade to version-0.52
[p5sagit/p5-mst-13.2.git] / lib / File / Spec / Functions.pm
1 package File::Spec::Functions;
2
3 use File::Spec;
4 use strict;
5
6 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
7
8 $VERSION = '1.3';
9
10 require Exporter;
11
12 @ISA = qw(Exporter);
13
14 @EXPORT = qw(
15         canonpath
16         catdir
17         catfile
18         curdir
19         rootdir
20         updir
21         no_upwards
22         file_name_is_absolute
23         path
24 );
25
26 @EXPORT_OK = qw(
27         devnull
28         tmpdir
29         splitpath
30         splitdir
31         catpath
32         abs2rel
33         rel2abs
34         case_tolerant
35 );
36
37 %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
38
39 foreach my $meth (@EXPORT, @EXPORT_OK) {
40     my $sub = File::Spec->can($meth);
41     no strict 'refs';
42     *{$meth} = sub {&$sub('File::Spec', @_)};
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
76         rootdir
77         updir
78         no_upwards
79         file_name_is_absolute
80         path
81
82
83 The following functions are exported only by request.
84
85         devnull
86         tmpdir
87         splitpath
88         splitdir
89         catpath
90         abs2rel
91         rel2abs
92         case_tolerant
93
94 All the functions may be imported using the C<:ALL> tag.
95
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
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
107
108 =cut
109