in reply to Re^5: Installing chained methods (ambiguous name)
in thread Installing chained methods

Yeah, DrManhattan also suggested having an insert_method() function (I think its better named prepend_method) which sort of blows the whole ::AppendMethods name out of the water. Maybe something will come to me over lunch. I'd call it multi-methods but that's a different concept.

Maybe Class::ChainedMethods? That name isn't clear to me either but its another idea.

  • Comment on Re: Re^5: Installing chained methods (wrap a stub?)

Replies are listed 'Best First'.
Re^7: Installing chained methods ("hook" metaphor)
by Aristotle (Chancellor) on Apr 22, 2003 at 14:16 UTC
    Hmm.. chaining sometimes refers to calling a series of methods on the same object when they are set up to return $self, so I'm not sure that'd be better. How about Class::PrePostHooks? I think that makes the idea pretty clear. As for features, since you're writing a module, it would be nice if you also had a away of removing hooks in retrospect.

    Makeshifts last the longest.

      I think pre/post muddies the waters since that isn't what this is about. During breakfast two other names occurred to me - Class::CompositeMethod / Class::CompoundMethod. Right now I'm just flipping a coin to see which one I use. Or are those names going to conflict with other concepts?

        I don't think "compound" is taken, at least in this context - sounds good to me too.

        Makeshifts last the longest.