develooper Front page | perl.moose | Postings from February 2009

Re: advice on wrapping methods from a superclass

Thread Previous | Thread Next
From:
Oliver Charles
Date:
February 11, 2009 12:32
Subject:
Re: advice on wrapping methods from a superclass
Message ID:
5641883d0902111232y3c181b61g3757967571c5683d@mail.gmail.com
On Wed, Feb 11, 2009 at 7:01 PM, Dave Rolsky <autarch@urth.org> wrote:
> You want to use augment/inner, I think.
>
> See
> http://search.cpan.org/~drolsky/Moose-0.68/lib/Moose/Cookbook/Basics/Recipe6.pod
> and
> http://search.cpan.org/~drolsky/Moose-0.68/lib/Moose/Manual/MethodModifiers.pod#INNER_AND_AUGMENT

Actually, I think Jonathan is looking for inner and augment but the
other way round... Augment works on the subclass, but Jonathan needs
to run it in the superclass. I ran into just this problem, and ended
up going with the "sub foo" and "sub _do_foo" approach, but it's not
the nicest solution.

-- 
    Oliver Charles / aCiD2

Thread Previous | Thread Next


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