Re: Clock skew failures in Memoize test suite
[p5sagit/p5-mst-13.2.git] / ext / GDBM_File / GDBM_File.pm
index 75bc7c1..63225f0 100644 (file)
@@ -67,8 +67,9 @@ sub AUTOLOAD {
     ($constname = $AUTOLOAD) =~ s/.*:://;
     my ($error, $val) = constant($constname);
     Carp::croak $error if $error;
-    eval "sub $AUTOLOAD { $val }";
-    goto &$AUTOLOAD;
+    no strict 'refs';
+    *{$AUTOLOAD} = sub { $val };
+    goto &{$AUTOLOAD};
 }
 
 XSLoader::load 'GDBM_File', $VERSION;