X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FSpec%2FFunctions.pm;h=ffc11995235973c4eecf23da18a8ff9084eb540e;hb=f505c9832e74f948e2721f6c36b348502f15804c;hp=77561abf098535ef6bd7a93704e3e54b5d93a218;hpb=9ffcd8612a179e6a837df3e98019ae7fe24b4fa1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/Spec/Functions.pm b/lib/File/Spec/Functions.pm index 77561ab..ffc1199 100644 --- a/lib/File/Spec/Functions.pm +++ b/lib/File/Spec/Functions.pm @@ -3,7 +3,7 @@ package File::Spec::Functions; use File::Spec; use strict; -use vars qw(@ISA @EXPORT); +use vars qw(@ISA @EXPORT @EXPORT_OK); require Exporter; @@ -14,13 +14,16 @@ require Exporter; catdir catfile curdir - devnull rootdir - tmpdir updir no_upwards file_name_is_absolute path +); + +@EXPORT_OK = qw( + devnull + tmpdir splitpath splitdir catpath @@ -28,9 +31,10 @@ require Exporter; rel2abs ); -foreach my $meth (@EXPORT) { +foreach my $meth (@EXPORT, @EXPORT_OK) { + my $sub = File::Spec->can($meth); no strict 'refs'; - *{$meth} = File::Spec->can($meth); + *{$meth} = sub {&$sub('File::Spec', @_)}; } @@ -64,13 +68,17 @@ The following functions are exported by default. catdir catfile curdir - devnull rootdir - tmpdir updir no_upwards file_name_is_absolute path + + +The following functions are exported only by request. + + devnull + tmpdir splitpath splitdir catpath