Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 98531
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: rjbs [...] cpan.org
SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.1306-TRIAL



Subject: overloading still broken in 2.1302
As we discussed on IRC a few times, overloading is still broken. HTTP-Throwable's 001-basic still fails: ``` not ok 11 - ... got the right string overload # Failed test '... got the right string overload' # at t/lib/Test/HT.pm line 135. # got: 'Moose::Meta::Class::__ANON__::SERIAL::3=HASH(0x7ff922efb6f0)' # expected: '500 Internal Server Error' 1..11 ``` I'll look at making a simpler reproducer. -- rjbs
On Tue Sep 02 07:51:16 2014, RJBS wrote: Show quoted text
> As we discussed on IRC a few times, overloading is still broken. > HTTP-Throwable's 001-basic still fails: > > ``` > not ok 11 - ... got the right string overload > # Failed test '... got the right string overload' > # at t/lib/Test/HT.pm line 135. > # got: > 'Moose::Meta::Class::__ANON__::SERIAL::3=HASH(0x7ff922efb6f0)' > # expected: '500 Internal Server Error' > 1..11 > ``` > > I'll look at making a simpler reproducer.
I figured out the problem. The problem occurs when a role defines an overloading by method name without defining the sub: use overload q{""} => 'as_string'; requires 'as_string'; This is perfectly valid, but the current Moose code expects all overload ops to come with an associated subroutine body. If there is no such body, it just treats this as the overloading not existing at all. I think the fix is to use Devel::OverloadInfo so we can look at whether or not there is an associated method name without a sub. I suspect that the current code also fails if a subclass adds an overload pointing to a method in the parent class. Note to self: add a test for this too.
Subject: 2.1304-TRIAL breaks HTTP-Throwable-0.019
The remaining issues, as exposed by HTTP-Throwable, should be fixed by 2.1306. We are now on track to release as stable, 2.1400.