diff options
author | Jonathan Stowe <gellyfish@gellyfish.com> | 2001-09-29 16:52:43 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-30 00:31:07 +0000 |
commit | 57c778516574f3d031a85dcdab2d18deacee782a (patch) | |
tree | 5280f277d73f919be23b1f0e7daf59a3e935875d /ext/GDBM_File | |
parent | 8d344e3e57673a7c678a1daf0c8a5f11c220a8f9 (diff) | |
download | perl-57c778516574f3d031a85dcdab2d18deacee782a.tar.gz |
Remove string eval from AUTOLOAD
Message-ID: <Pine.LNX.4.33.0109291535120.18586-100000@orpheus.gellyfish.com>
p4raw-id: //depot/perl@12277
Diffstat (limited to 'ext/GDBM_File')
-rw-r--r-- | ext/GDBM_File/GDBM_File.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm index 75bc7c118c..63225f0362 100644 --- a/ext/GDBM_File/GDBM_File.pm +++ b/ext/GDBM_File/GDBM_File.pm @@ -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; |