summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/File/Spec/Functions.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-04-26 22:16:26 +0000
committerKarl Berry <karl@freefriends.org>2015-04-26 22:16:26 +0000
commit342e672574c4e67d510e46ab6acd0e21a7d0cf54 (patch)
tree79e04202d08c0404bbd780bd26c1e34710e539b6 /Master/tlpkg/tlperl/lib/File/Spec/Functions.pm
parentbe2706af7c57a0ef0f4d4e9f684ca4ef74922a82 (diff)
(tl)perl 5.20.2 for windows, from siep
git-svn-id: svn://tug.org/texlive/trunk@37064 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/File/Spec/Functions.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/File/Spec/Functions.pm24
1 files changed, 22 insertions, 2 deletions
diff --git a/Master/tlpkg/tlperl/lib/File/Spec/Functions.pm b/Master/tlpkg/tlperl/lib/File/Spec/Functions.pm
index f5b9046aa5e..451f5bd735f 100644
--- a/Master/tlpkg/tlperl/lib/File/Spec/Functions.pm
+++ b/Master/tlpkg/tlperl/lib/File/Spec/Functions.pm
@@ -5,7 +5,7 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
-$VERSION = '3.40';
+$VERSION = '3.48_01';
$VERSION =~ tr/_//;
require Exporter;
@@ -37,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', @_)};
+ }
}