summaryrefslogtreecommitdiff
path: root/ext/File
diff options
context:
space:
mode:
authorBenjamin Sugars <bsugars@canoe.ca>2001-04-03 13:03:48 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-04 04:20:24 +0000
commit7d3fb23018f73b213481a8b6b108e1dc03cefcff (patch)
tree58559eb0c4adc2eada2d027b6c5fa664215f37fa /ext/File
parent4c901d042e1d6bd9046b03cfbf665c2899614c5c (diff)
downloadperl-7d3fb23018f73b213481a8b6b108e1dc03cefcff.tar.gz
Re: [PATCH] Lighten up glob
Message-ID: <Pine.LNX.4.21.0104031700340.2143-100000@marmot.rim.canoe.ca> p4raw-id: //depot/perl@9541
Diffstat (limited to 'ext/File')
-rw-r--r--ext/File/Glob/Glob.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm
index 561f33154d..da331b1be7 100644
--- a/ext/File/Glob/Glob.pm
+++ b/ext/File/Glob/Glob.pm
@@ -1,13 +1,10 @@
package File::Glob;
use strict;
-use Carp;
our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS,
$AUTOLOAD, $DEFAULT_FLAGS);
-require Exporter;
use XSLoader ();
-require AutoLoader;
@ISA = qw(Exporter AutoLoader);
@@ -60,6 +57,7 @@ require AutoLoader;
$VERSION = '0.991';
sub import {
+ require Exporter;
my $i = 1;
while ($i < @_) {
if ($_[$i] =~ /^:(case|nocase|globally)$/) {
@@ -67,7 +65,7 @@ sub import {
$DEFAULT_FLAGS &= ~GLOB_NOCASE() if $1 eq 'case';
$DEFAULT_FLAGS |= GLOB_NOCASE() if $1 eq 'nocase';
if ($1 eq 'globally') {
- no warnings;
+ local $^W;
*CORE::GLOBAL::glob = \&File::Glob::csh_glob;
}
next;
@@ -87,11 +85,13 @@ sub AUTOLOAD {
my $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
if ($! =~ /Invalid/) {
+ require AutoLoader;
$AutoLoader::AUTOLOAD = $AUTOLOAD;
goto &AutoLoader::AUTOLOAD;
}
else {
- croak "Your vendor has not defined File::Glob macro $constname";
+ require Carp;
+ Carp::croak("Your vendor has not defined File::Glob macro $constname");
}
}
eval "sub $AUTOLOAD { $val }";