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

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.

  • Comment on Re^5: Installing chained methods (ambiguous name)

Replies are listed 'Best First'.
Re: Re^5: Installing chained methods (wrap a stub?)
by diotalevi (Canon) on Apr 22, 2003 at 14:07 UTC

    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.

        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?