Another alternative is the factory pattern, where method calls in your "Thing" class spit out backend objects given parameters, etc.It seems to me that a factory pattern is exactly what he is doing here.
Of course the way he is doing it is not the way the Gang of Four show in the Design Patterns book, but he's not coding it in C++ or smalltalk (which they do).package main; my $x = Thing->new( backend => 'A' ); $x->backend->do();
Much as you say, TIMTOWTDI.
-stvnIn reply to Re: Re: how do you call this? $x->bar();
by stvn
in thread how do you call this? $x->bar();
by dada
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |