summaryrefslogtreecommitdiff
path: root/ext/GDBM_File
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-20 15:34:48 +0200
committerNicholas Clark <nick@ccl4.org>2010-10-21 08:42:21 +0200
commit6642cd871fb3dfba83e01e1a65bc2b4aa094387f (patch)
tree84ba3c583def3d14e0d09a1da0b7f22eac0c3534 /ext/GDBM_File
parentb88ba6ea2d1d4c64ceab997d68b62a772f69b5c9 (diff)
downloadperl-6642cd871fb3dfba83e01e1a65bc2b4aa094387f.tar.gz
Convert GDBM_File to an XS AUTOLOAD.
Diffstat (limited to 'ext/GDBM_File')
-rw-r--r--ext/GDBM_File/GDBM_File.pm12
-rw-r--r--ext/GDBM_File/Makefile.PL2
2 files changed, 2 insertions, 12 deletions
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index 21a5d8df93..8508564d23 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -43,7 +43,7 @@ package GDBM_File;
use strict;
use warnings;
-our($VERSION, @ISA, @EXPORT, $AUTOLOAD);
+our($VERSION, @ISA, @EXPORT);
require Carp;
require Tie::Hash;
@@ -71,16 +71,6 @@ require XSLoader;
# This module isn't dual life, so no need for dev version numbers.
$VERSION = '1.12';
-sub AUTOLOAD {
- my($constname);
- ($constname = $AUTOLOAD) =~ s/.*:://;
- my ($error, $val) = constant($constname);
- Carp::croak $error if $error;
- no strict 'refs';
- *{$AUTOLOAD} = sub { $val };
- goto &{$AUTOLOAD};
-}
-
XSLoader::load();
1;
diff --git a/ext/GDBM_File/Makefile.PL b/ext/GDBM_File/Makefile.PL
index 6484dd799e..2a44d3e1d8 100644
--- a/ext/GDBM_File/Makefile.PL
+++ b/ext/GDBM_File/Makefile.PL
@@ -12,7 +12,7 @@ WriteConstants(
NAME => 'GDBM_File',
DEFAULT_TYPE => 'IV',
BREAKOUT_AT => 8,
- PROXYSUBS => 1,
+ PROXYSUBS => {autoload => 1},
NAMES => [qw(GDBM_CACHESIZE GDBM_CENTFREE GDBM_COALESCEBLKS
GDBM_FAST GDBM_FASTMODE GDBM_INSERT GDBM_NEWDB GDBM_NOLOCK
GDBM_OPENMASK GDBM_READER GDBM_REPLACE GDBM_SYNC GDBM_SYNCMODE