X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FDB_File%2FDB_File.pm;h=5ac1120b1792aaf0a0d5a241bd1ab36b4d9b50a4;hb=0d73bec8afda581f611a829e9b78bcf09d06a888;hp=289ac0a65c792313d7be0b17142768cbbb4cbaa0;hpb=39793c41fa47cd0f2279753690de973d31394375;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 289ac0a..5ac1120 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -222,8 +222,9 @@ sub AUTOLOAD { "; } } - eval "sub $AUTOLOAD { $val }"; - goto &$AUTOLOAD; + no strict 'refs'; + *{$AUTOLOAD} = sub { $val }; + goto &{$AUTOLOAD}; } @@ -948,7 +949,7 @@ database. Duplicate keys are entirely defined by the comparison function. In the case-insensitive example above, the keys: 'KEY' and 'key' would be considered duplicates, and assigning to the second one -would overwirte the first. If duplicates are allowed for (with the +would overwrite the first. If duplicates are allowed for (with the R_DUPS flag discussed below), only a single copy of duplicate keys is stored in the database --- so (again with example above) assigning three values to the keys: 'KEY', 'Key', and 'key' would leave just