use strict;
use warnings FATAL => 'all';
+use File::Glob ();
+
+
+
my $IN_SCOPE = 0;
sub import {
my $opts = shift(@args) if ref($args[0]) eq 'HASH';
my $target = $class->_find_target(0, $opts);
my @tags = $class->_find_tags(@args);
+ $class->_setup_glob_override;
my $unex = $class->_export_tags_into($target => @tags);
$class->_install_unexporter($unex);
$IN_SCOPE = 1;
*CORE::GLOBAL::glob = sub {
for ($_[0]) {
# unless it smells like </foo> or <foo bar="baz">
- return CORE::glob($_[0]) unless (/^\/\w+$/ || /^\w+\s+\w+="/);
+ return File::Glob::glob($_[0]) unless (/^\/\w+$/ || /^\w+\s+\w+="/);
}
return '<'.$_[0].'>';
};
no strict 'refs';
tie *{"${into}::${tag}"}, 'XML::Tags::TIEHANDLE', "<${tag}>";
}
- my $orig = \&CORE::GLOBAL::glob || sub { CORE::glob($_[0]) };
- {
- no warnings 'redefine';
- *CORE::GLOBAL::glob = sub { '<'.$_[0].'>' };
- }
return sub {
foreach my $tag (@tags) {
no strict 'refs';