diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-06-14 21:37:47 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-15 13:15:26 +0000 |
commit | 97a5fa0b47cfdf459933135295df3f8510ad5999 (patch) | |
tree | 2f810e926e8bcd0891f5c96270a44b643d353314 /ext/GDBM_File/GDBM_File.pm | |
parent | 8514a89ddb9f1e33f9830c00e00db83cbd8945f9 (diff) | |
download | perl-97a5fa0b47cfdf459933135295df3f8510ad5999.tar.gz |
GDBM_File (wasRe: ext/ + -Wall)
Message-ID: <20010614203747.F98663@plum.flirble.org>
p4raw-id: //depot/perl@10599
Diffstat (limited to 'ext/GDBM_File/GDBM_File.pm')
-rw-r--r-- | ext/GDBM_File/GDBM_File.pm | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 310243c736..f857f3830e 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -46,7 +46,6 @@ our($VERSION, @ISA, @EXPORT, $AUTOLOAD); require Carp; require Tie::Hash; require Exporter; -use AutoLoader; use XSLoader (); @ISA = qw(Tie::Hash Exporter); @EXPORT = qw( @@ -61,29 +60,17 @@ use XSLoader (); GDBM_WRITER ); -$VERSION = "1.05"; +$VERSION = "1.06"; sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; - my $val = constant($constname, @_ ? $_[0] : 0); - if ($! != 0) { - if ($! =~ /Invalid/ || $!{EINVAL}) { - $AutoLoader::AUTOLOAD = $AUTOLOAD; - goto &AutoLoader::AUTOLOAD; - } - else { - Carp::croak("Your vendor has not defined GDBM_File macro $constname, used"); - } - } + my ($error, $val) = constant($constname); + Carp::croak $error if $error; eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } XSLoader::load 'GDBM_File', $VERSION; -# Preloaded methods go here. Autoload methods go after __END__, and are -# processed by the autosplit program. - 1; -__END__ |