Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Re: RFC: Class::DispatchToAll

by domm (Chaplain)
on Jul 11, 2002 at 07:52 UTC ( #180966=note: print w/replies, xml ) Need Help??

in reply to Re: RFC: Class::DispatchToAll
in thread RFC: Class::DispatchToAll

but this is exactly opposite the usual concern when people write multiple versions of the same method; namely, to override functionality present at higher levels in the hierarchy!

When using this module, I do not want to override methods, but explicitly call all of them (and collect the return values). You can still use normal Perl behaviour, Class::DispatchToAll is meant as an alternative to the Perl Inheritance mechanism, not as a replacement. Only use it when you need it. And it only is used when you explictly call for it...

However NEXT already does just this.

As frag pointed out, you would have to alter each and every method to include $_[0]->NEXT::method() at the end. Doesn't seems lazy enough to me...

-- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://180966]
[Your Mother]: Yep. Publish or die. Content be damned.
[Your Mother]: Comfort food and diabetes for the soul.
[LanX]: talking about comic adaptions ... I really liked the Watchmen
[LanX]: look I can give you a long list of excellent US movies
[Your Mother]: I adored the comic and the movie was almost a frame for frame remake (excepting the plot liberties to shorten it) but I still didn't quite like it. What's his nose, Jamie Earl whoever was flawless though.
LanX though probably produced outside Holywood
[Your Mother]: There are tons of good movies from all over but for every gem there is a pile of dirt 10 meters high burying it.
[LanX]: well
[LanX]: who's Jamie Earl?
[Your Mother]: Also: I am old and complaining is my hobby.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2018-03-19 15:00 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.