diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-05-18 16:56:50 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-21 18:09:30 -0700 |
commit | 3aaeec97680c6839567bb4fb292d6aa1824c6031 (patch) | |
tree | 696ef2abd8ad6acd3b45711a2269233abd8c4159 /lib/overload.pm | |
parent | 50853fa94fa95a4fad70b61c9360709826bb8093 (diff) | |
download | perl-3aaeec97680c6839567bb4fb292d6aa1824c6031.tar.gz |
overload.pm: Don’t touch %OVERLOAD’s dummy entry
Now that mro_method_changed_in (triggered by the
‘*{$package . "::()"} = \&nil;’ assignment) causes overloadedness to
be checked the next time a overloaded operation occurs, it is not nec-
essary to trigger %OVERLOAD’s magic explicitly.
This also means that PL_amagic_generation is not incremented any more.
Unfortunately, we cannot eliminate it, as there are XS modules that
expect to increment it themselves to mark their caches as stale.
Diffstat (limited to 'lib/overload.pm')
-rw-r--r-- | lib/overload.pm | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/overload.pm b/lib/overload.pm index f270310baa..109b7c5d86 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -31,7 +31,6 @@ sub OVERLOAD { $package = shift; my %arg = @_; my ($sub, $fb); - $ {$package . "::OVERLOAD"}{dummy}++; # Register with magic by touching. *{$package . "::()"} = \&nil; # Make it findable via fetchmethod. for (keys %arg) { if ($_ eq 'fallback') { @@ -62,7 +61,6 @@ sub import { sub unimport { $package = (caller())[0]; - ${$package . "::OVERLOAD"}{dummy}++; # Upgrade the table shift; for (@_) { delete $ {$package . "::"}{"(" . $_}; |