develooper Front page | perl.perl5.porters | Postings from September 2010

[perl #71998] overload::Method can die with blessed methods

From:
Father Chrysostomos via RT
Date:
September 28, 2010 14:43
Subject:
[perl #71998] overload::Method can die with blessed methods
Message ID:
rt-3.6.HEAD-24759-1285710197-335.71998-14-0@perl.org
On Sun Jan 10 13:41:49 2010, sprout wrote:
> 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.

Applied as 56f08af290811ab8a077e73d46dff25b99848a89.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About