This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #71998] overload::Method can die with blessed methods
authorFather Chrysostomos <sprout@cpan.org>
Tue, 28 Sep 2010 20:53:51 +0000 (13:53 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 28 Sep 2010 20:53:51 +0000 (13:53 -0700)
commit56f08af290811ab8a077e73d46dff25b99848a89
tree076fcdff1f899170901b7f577f784fa31a546a2b
parent9dcc53ea14d7a502bb5ac0877765bde14f8cc721
[perl #71998] overload::Method can die with blessed methods

If an overload method is itself blessed into a class that has
overloaded operators but does not have fallback enabled, then an error
is produced:

$ perl5.10.0
use overload '+' => sub{};
bless overload::Method main => '+';
overload::Method main => '+';
^D
Operation "ne": no method found,
left argument in overloaded package main,
right argument has no overloaded magic at /usr/local/lib/perl5/5.10.0/
overload.pm line 59.

The attached patch fixes this.
lib/overload.pm
lib/overload.t
pod/perldelta.pod