Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 83526
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: bobtfish [...] bobtfish.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Bill Moseley <moseley [...] hank.org>
Subject: Fwd: Moo and Moose together with Throwable::Error.
Date: Fri, 22 Feb 2013 01:37:23 +0000
To: bug-Moo [...] rt.cpan.org
From: Tomas Doran <bobtfish [...] bobtfish.net>
Begin forwarded message: Show quoted text
> From: Bill Moseley <moseley@hank.org> > Subject: Re: Moo and Moose together with Throwable::Error. > Date: 21 February 2013 01:56:39 GMT > To: moose@perl.org > > On Wed, Feb 20, 2013 at 11:18 AM, Tomas Doran <bobtfish@bobtfish.net> wrote: >
>> >> On 20 Feb 2013, at 06:36, Bill Moseley <moseley@hank.org> wrote: >>
>>> Am I correct that "around" just will not work any more? >>>
>> >> No, this should just work. >> >> The Moo class will get upgraded to a Moose class automatically, you >> shouldn't need to do anything - this should 'just work'. >> >> It's a bug in Moo if it doesn't (and one that will get fixed if you can >> provide a simpleish test - which sounds easy in this case). >>
> > Moo $VERSION = '1.000004'; # 1.0.4 > $Moose::VERSION = '2.0604'; > $Throwable::Error::VERSION = '0.200003'; > > > > package My::Throwable; > use Moose; > extends 'Throwable::Error'; > > around _build_stack_trace_args => sub { > my ( $orig, $self, @rest ) = @_; > return $self->$orig( @rest ); > }; > > package main; > > My::Throwable->throw({ message => 'oops', }); > > > The method '_build_stack_trace_args' was not found in the inheritance > hierarchy for My::Throwable at > /home/bill/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux/Class/MOP/Class.pm > line 1053. > > But I can override: > > package My::Throwable; > use Moose; > extends 'Throwable::Error'; > > sub _build_stack_trace_args { die "override works!\n" } > > package main; > > My::Throwable->throw({ message => 'oops', }); > > > override works! > > shell returned 255 > > > > > -- > Bill Moseley > moseley@hank.org
This is a duplicate of RT#83508. I have a branch with a test and I believe a fix as well.
One-liner to reproduce: $ perl -E 'package TE; use Moose; extends "Throwable::Error"; around "throw" => sub { }' The method 'throw' was not found in the inheritance hierarchy for TE at ... Thanks,
This is fixed in Moo 1.001000