reinstate the right glob in XML::Tags (RT#120071) globbery
Dagfinn Ilmari Mannsåker [Thu, 2 Feb 2017 12:55:48 +0000 (12:55 +0000)]
CORE::glob is equivalent to File::Glob::csh_glob, not bsd_glob (which is
what the now-deprecated File::Glob::glob calls).

Changes
lib/XML/Tags.pm
t/globbery/three [new file with mode: 0644]
t/tags.t

diff --git a/Changes b/Changes
index e739639..e0fd1c2 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Web-Simple
 
+  - reinstate the right glob in XML::Tags
+
 0.032 - 2016-11-15
   - add HTTP::Body dep
   - fix Test::More dep
index a9e0785..6a0ea5c 100644 (file)
@@ -73,7 +73,7 @@ sub _export_tags_into {
       no strict 'refs';
       delete ${"${into}::"}{$tag}
     }
-    _set_glob(\&File::Glob::glob);
+    _set_glob(\&File::Glob::csh_glob);
     overload::remove_constant('q');
     $IN_SCOPE = 0;
   };
diff --git a/t/globbery/three b/t/globbery/three
new file mode 100644 (file)
index 0000000..e69de29
index 91edf08..52dbc90 100644 (file)
--- a/t/tags.t
+++ b/t/tags.t
@@ -1,6 +1,8 @@
 use strict; use warnings FATAL => 'all';
 use Test::More qw(no_plan);
 
+my $globbery;
+BEGIN { $globbery = join(', ', <t/globbery/o* t/globbery/t*>) }
 {
 
   package Foo;
@@ -60,7 +62,7 @@ use Test::More qw(no_plan);
   }
 
   sub globbery {
-    <t/globbery/*>;
+    <t/globbery/o* t/globbery/t*>;
   }
 }
 
@@ -123,6 +125,6 @@ is(
 
 is(
   join(', ', Foo::globbery),
-  't/globbery/one, t/globbery/two',
+  $globbery,
   'real glob re-installed ok'
 );