in reply to Re^3: Installing chained methods (wrap a stub?)
in thread Installing chained methods

What do you think of calling it 'Class::AppendMethods'?

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

Replies are listed 'Best First'.
Re^5: Installing chained methods (ambiguous name)
by Aristotle (Chancellor) on Apr 22, 2003 at 14:01 UTC

    So you're rolling your own after all?

    I don't know if AppendMethods is very descriptive.. append to what? To the class? To an object? I could mean a number of things other than what you intend.

    I don't have an idea for a better name right now either though.

    Makeshifts last the longest.

      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.

        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.