summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/File/Glob.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
committerKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
commit300c1eb6d37d46078d448d6d58938d5a80cd68ff (patch)
tree23a0a8b9f8f5460b405119c4d3c163d2d488ca5e /Master/tlpkg/tlperl/lib/File/Glob.pm
parented55d86b7c5e18f6eccce80a1fb1423ca40a23b5 (diff)
(tl)perl 5.18.2 for windows from siep
git-svn-id: svn://tug.org/texlive/trunk@33648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/File/Glob.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/File/Glob.pm36
1 files changed, 20 insertions, 16 deletions
diff --git a/Master/tlpkg/tlperl/lib/File/Glob.pm b/Master/tlpkg/tlperl/lib/File/Glob.pm
index cd15922f32e..f144b5179dc 100644
--- a/Master/tlpkg/tlperl/lib/File/Glob.pm
+++ b/Master/tlpkg/tlperl/lib/File/Glob.pm
@@ -4,7 +4,6 @@ use strict;
our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, $DEFAULT_FLAGS);
require XSLoader;
-use feature 'switch';
@ISA = qw(Exporter);
@@ -38,26 +37,31 @@ pop @{$EXPORT_TAGS{bsd_glob}}; # no "glob"
@EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
-$VERSION = '1.17';
+$VERSION = '1.20_01';
sub import {
require Exporter;
local $Exporter::ExportLevel = $Exporter::ExportLevel + 1;
Exporter::import(grep {
- my $passthrough;
- given ($_) {
- $DEFAULT_FLAGS &= ~GLOB_NOCASE() when ':case';
- $DEFAULT_FLAGS |= GLOB_NOCASE() when ':nocase';
- when (':globally') {
- no warnings 'redefine';
- *CORE::GLOBAL::glob = \&File::Glob::csh_glob;
- }
- if ($_ eq ':bsd_glob') {
- no strict; *{caller."::glob"} = \&bsd_glob_override;
- }
- $passthrough = 1;
+ my $passthrough;
+ if ($_ eq ':case') {
+ $DEFAULT_FLAGS &= ~GLOB_NOCASE()
+ }
+ elsif ($_ eq ':nocase') {
+ $DEFAULT_FLAGS |= GLOB_NOCASE();
+ }
+ elsif ($_ eq ':globally') {
+ no warnings 'redefine';
+ *CORE::GLOBAL::glob = \&File::Glob::csh_glob;
}
- $passthrough;
+ elsif ($_ eq ':bsd_glob') {
+ no strict; *{caller."::glob"} = \&bsd_glob_override;
+ $passthrough = 1;
+ }
+ else {
+ $passthrough = 1;
+ }
+ $passthrough;
} @_);
}
@@ -71,7 +75,7 @@ if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) {
# File::Glob::glob() is deprecated because its prototype is different from
# CORE::glob() (use bsd_glob() instead)
sub glob {
- splice @_, 1; # don't pass PL_glob_index as flags!
+ splice @_, 1; # no flags
goto &bsd_glob;
}