On Wed, Feb 20, 2013 at 11:18 AM, Tomas Doran <bobtf...@bobtfish.net> wrote:

>
> On 20 Feb 2013, at 06:36, Bill Moseley <mose...@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
mose...@hank.org

Reply via email to