This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
This is my patch patch.1n for perl5.001.
[perl5.git] / ext / GDBM_File / GDBM_File.pm
CommitLineData
a0d0e21e
LW
1package GDBM_File;
2
3require Carp;
4require TieHash;
5require Exporter;
3b35bae3 6use AutoLoader;
a0d0e21e 7require DynaLoader;
fec02dd3 8@ISA = qw(TieHash Exporter DynaLoader);
a0d0e21e
LW
9@EXPORT = qw(
10 GDBM_CACHESIZE
11 GDBM_FAST
12 GDBM_INSERT
13 GDBM_NEWDB
14 GDBM_READER
15 GDBM_REPLACE
16 GDBM_WRCREAT
17 GDBM_WRITER
18);
19
20sub AUTOLOAD {
a0d0e21e
LW
21 local($constname);
22 ($constname = $AUTOLOAD) =~ s/.*:://;
23 $val = constant($constname, @_ ? $_[0] : 0);
24 if ($! != 0) {
25 if ($! =~ /Invalid/) {
26 $AutoLoader::AUTOLOAD = $AUTOLOAD;
27 goto &AutoLoader::AUTOLOAD;
28 }
29 else {
30 Carp::croak("Your vendor has not defined GDBM_File macro $constname, used");
31 }
32 }
33 eval "sub $AUTOLOAD { $val }";
34 goto &$AUTOLOAD;
35}
36
37bootstrap GDBM_File;
38
39# Preloaded methods go here. Autoload methods go after __END__, and are
40# processed by the autosplit program.
41
421;
43__END__