X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FGDBM_File%2FGDBM_File.pm;h=310243c736e8233a984f7d6fa98ec65121f8b04b;hb=f4db54055cd36d83622f77949fd6ab7c67198101;hp=9c7ae066b79cf026af459510432049305cdbd72f;hpb=c954a603b8f02c172ffe0fd3503b4d7ca983ad99;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 9c7ae06..310243c 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -7,7 +7,7 @@ GDBM_File - Perl5 access to the gdbm library. =head1 SYNOPSIS use GDBM_File ; - tie %hash, 'GDBM_File', $filename, &GDBM_WRCREAT, 0640); + tie %hash, 'GDBM_File', $filename, &GDBM_WRCREAT, 0640; # Use the %hash array. untie %hash ; @@ -33,40 +33,42 @@ The available functions and the gdbm/perl interface need to be documented. =head1 SEE ALSO -L, L. +L, L, L. =cut package GDBM_File; use strict; -use vars qw($VERSION @ISA @EXPORT $AUTOLOAD); +use warnings; +our($VERSION, @ISA, @EXPORT, $AUTOLOAD); require Carp; require Tie::Hash; require Exporter; use AutoLoader; -require DynaLoader; -@ISA = qw(Tie::Hash Exporter DynaLoader); +use XSLoader (); +@ISA = qw(Tie::Hash Exporter); @EXPORT = qw( GDBM_CACHESIZE GDBM_FAST GDBM_INSERT GDBM_NEWDB + GDBM_NOLOCK GDBM_READER GDBM_REPLACE GDBM_WRCREAT GDBM_WRITER ); -$VERSION = "1.00"; +$VERSION = "1.05"; sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { - if ($! =~ /Invalid/) { + if ($! =~ /Invalid/ || $!{EINVAL}) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } @@ -78,7 +80,7 @@ sub AUTOLOAD { goto &$AUTOLOAD; } -bootstrap GDBM_File $VERSION; +XSLoader::load 'GDBM_File', $VERSION; # Preloaded methods go here. Autoload methods go after __END__, and are # processed by the autosplit program.