fixes to enable PERL_OBJECT build with mingw32/egcs-1.0.2
[p5sagit/p5-mst-13.2.git] / ext / GDBM_File / GDBM_File.pm
index 179f9a9..09df437 100644 (file)
@@ -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 ;
 
@@ -39,12 +39,15 @@ L<perl(1)>, L<DB_File(3)>.
 
 package GDBM_File;
 
+use strict;
+use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
+
 require Carp;
-require TieHash;
+require Tie::Hash;
 require Exporter;
 use AutoLoader;
 require DynaLoader;
-@ISA = qw(TieHash Exporter DynaLoader);
+@ISA = qw(Tie::Hash Exporter DynaLoader);
 @EXPORT = qw(
        GDBM_CACHESIZE
        GDBM_FAST
@@ -56,10 +59,12 @@ require DynaLoader;
        GDBM_WRITER
 );
 
+$VERSION = "1.00";
+
 sub AUTOLOAD {
-    local($constname);
+    my($constname);
     ($constname = $AUTOLOAD) =~ s/.*:://;
-    $val = constant($constname, @_ ? $_[0] : 0);
+    my $val = constant($constname, @_ ? $_[0] : 0);
     if ($! != 0) {
        if ($! =~ /Invalid/) {
            $AutoLoader::AUTOLOAD = $AUTOLOAD;
@@ -73,7 +78,7 @@ sub AUTOLOAD {
     goto &$AUTOLOAD;
 }
 
-bootstrap GDBM_File;
+bootstrap GDBM_File $VERSION;
 
 # Preloaded methods go here.  Autoload methods go after __END__, and are
 # processed by the autosplit program.