If you have Foo::Baz and Foo:Quux and ..., then you may want to create a Foo::Factory, which has the new method. (this could be your Foo::Bar)
In perl, it seems quite reasonable to name the factory "new" and to pass parameters that control what is created. Languages like Java or C++ wouldn't like it; but this is Perl! (its best, though, if all the different things that your factory method creates all share a common interface) --Dave
In reply to Re: OO semantics quandary
by dpuu
in thread OO semantics quandary
by belg4mit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |