diff options
| author | fukachan <fukachan> | 2018-01-13 08:48:42 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2018-01-13 08:48:42 +0000 |
| commit | 28a388f6aeced7f8dd585a84bde0f0ddf0bb7a69 (patch) | |
| tree | 7fbe3b9fc9209113e15e00fbdf9663ff1f16190d /cpan/lib/File/Spec/Functions.pm | |
| parent | dbab3c94592a2f0ef40175cf39cf89fbe5503c41 (diff) | |
| download | fml8-PathTools-3-62.tar.gz fml8-PathTools-3-62.tar.bz2 fml8-PathTools-3-62.zip | |
import PathTools-3.62PathTools-3-62
Diffstat (limited to 'cpan/lib/File/Spec/Functions.pm')
| -rw-r--r-- | cpan/lib/File/Spec/Functions.pm | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/cpan/lib/File/Spec/Functions.pm b/cpan/lib/File/Spec/Functions.pm index 1c36e8b9..470c7718 100644 --- a/cpan/lib/File/Spec/Functions.pm +++ b/cpan/lib/File/Spec/Functions.pm @@ -5,7 +5,8 @@ use strict; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); -$VERSION = '1.3'; +$VERSION = '3.62'; +$VERSION =~ tr/_//d; require Exporter; @@ -36,10 +37,30 @@ require Exporter; %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] ); +require File::Spec::Unix; +my %udeps = ( + canonpath => [], + catdir => [qw(canonpath)], + catfile => [qw(canonpath catdir)], + case_tolerant => [], + curdir => [], + devnull => [], + rootdir => [], + updir => [], +); + foreach my $meth (@EXPORT, @EXPORT_OK) { my $sub = File::Spec->can($meth); no strict 'refs'; - *{$meth} = sub {&$sub('File::Spec', @_)}; + if (exists($udeps{$meth}) && $sub == File::Spec::Unix->can($meth) && + !(grep { + File::Spec->can($_) != File::Spec::Unix->can($_) + } @{$udeps{$meth}}) && + defined(&{"File::Spec::Unix::_fn_$meth"})) { + *{$meth} = \&{"File::Spec::Unix::_fn_$meth"}; + } else { + *{$meth} = sub {&$sub('File::Spec', @_)}; + } } @@ -93,7 +114,17 @@ The following functions are exported only by request. All the functions may be imported using the C<:ALL> tag. +=head1 COPYRIGHT + +Copyright (c) 2004 by the Perl 5 Porters. All rights reserved. + +This program is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + =head1 SEE ALSO File::Spec, File::Spec::Unix, File::Spec::Mac, File::Spec::OS2, File::Spec::Win32, File::Spec::VMS, ExtUtils::MakeMaker + +=cut + |
