in reply to OO: Building an object of the right type based on a parameter
I think that's eminently reasonable, and do it all the time.
For another layer of flexibility, you may want to use some other identifying string and then provide a hash that maps those strings to package names; using Class::Factory as lachoy suggests is a sensible implementation choice.
|
|---|