summaryrefslogtreecommitdiff
path: root/lib/overload.pm
diff options
context:
space:
mode:
authorGeoffrey T. Dairiki <dairiki at dairiki.org>2009-08-04 17:54:34 -0700
committerJesse Vincent <jesse@bestpractical.com>2009-10-12 13:04:08 -0400
commitc989e6a3e4b89b26d315693449c76cdcb754611f (patch)
tree4b8dcd0906c356678b4f9e22aec507e23c63d46c /lib/overload.pm
parent3a2461997c4ea41f425afe2d21ff1e63cbd07365 (diff)
downloadperl-c989e6a3e4b89b26d315693449c76cdcb754611f.tar.gz
overload no longer implicitly unsets fallback on repeated 'use overload' lines - Fix for RT#68916
Subject: overload::import resets the setting of 'fallback' Date: Tue, 04 Aug 2009 17:54:34 -0700 From: "Geoffrey T. Dairiki" <dairiki at dairiki.org>
Diffstat (limited to 'lib/overload.pm')
-rw-r--r--lib/overload.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/overload.pm b/lib/overload.pm
index d5ac5ad073..fffff6e80c 100644
--- a/lib/overload.pm
+++ b/lib/overload.pm
@@ -9,6 +9,7 @@ sub OVERLOAD {
my %arg = @_;
my ($sub, $fb);
$ {$package . "::OVERLOAD"}{dummy}++; # Register with magic by touching.
+ $fb = ${$package . "::()"}; # preserve old fallback value RT#68196
*{$package . "::()"} = \&nil; # Make it findable via fetchmethod.
for (keys %arg) {
if ($_ eq 'fallback') {