in reply to OO semantics quandary
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
|
---|