develooper Front page | perl.perl5.porters | Postings from August 2008

Re: the warning about parents in Universal->isa

Thread Previous | Thread Next
From:
Chris Prather
Date:
August 24, 2008 06:27
Subject:
Re: the warning about parents in Universal->isa
Message ID:
12b83b2d0808230620j26e28972wfcd0bd481730dc88@mail.gmail.com
On Fri, Aug 22, 2008 at 4:53 PM, chromatic <chromatic@wgz.org> wrote:

> On Friday 22 August 2008 08:11:44 Yuval Kogman wrote:
>
> > Also now that we have DOES it seems fair to just shove names onto
> > @ISA for interfaces with no functionality whatsoever.
>
> Ugh, no.  Override DOES instead.  They're different for a reason.
>
> -- c
>

How do you override a method without subclassing, using a method modifier
(Moose, Class::MethodModifiers),  or doing something naughty like:

my $next = MyApp->can('DOES');
*MyApp::DOES = sub { my $self = shift; my @ret = $self->$next(@_); push
@ret, __PACKAGE__ };


?

-Chris

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