On Thu, 10 Jul 2003, Richard Clamp wrote: > On Thu, Jul 10, 2003 at 04:14:21PM +0100, Shevek wrote: > > But if this were the case (for a general system of this type), then the > > type of storage now becomes a matter for the code, rather than just a > > configuration variable, and > > > > my $obj = Factory->new($type, ...) > > > > becomes in every piece of code: > > > > my $obj; > > if ($type eq 'a') { > > $obj = Factory->a(...); > > } > > elsif ($type eq 'b') { > > $obj = Factory->b(...); > > } > > Or, if you're familiar with the fun of perls OO it remains the much > more similar: > > my $obj = Factory->$type(...);
But now you are allowing configuration variables to modify actual code, whereas normally for security reasons one would prefer to keep code and data strictly separate. I still prefer the DBI method. S. -- Shevek http://www.anarres.org/ I am the Borg. http://www.gothnicity.org/