in reply to OO: Factory vs. "Seed" (?) pattern
In other words, you have
A factory does not need to be an object, regardless of whatever anyone told you. A factory can be a class. You have a factory pattern and it makes perfect sense. I have a very similar setup in Excel::Template with Excel::Template::Factory. I pass it a nodename and it gives me back an object that represents the node. That is the definition of a factory. Whether it's a class method or an object method is a function of whether or not you need more than one factory running at the same time.my $obj = Foo->bar( @params ); isa_ok( $obj, 'Foo::Child' );
|
|---|