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)
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.


No differences found