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"); } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; }