Not to quibble, but no, I don't think that's what "factory pattern" means.
A factory hides the mechanics of constructing new objects behind another interface, whereas all of the instantiation done in this example is explicit.
I'd say the OP is showing a behavior composition technique, like the GoF's Strategy pattern, expressed in proper Perl idiom.
In reply to Re: Re: Re: how do you call this? $x->bar();
by simonm
in thread how do you call this? $x->bar();
by dada
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |