in reply to Re: Object loading at runtime
in thread Object loading at runtime
sub TypeA { return "Class::SubclassA" } sub TypeB { return "Class::SubclassB" } sub create { my $class = shift; if (shift eq "B") { return $class->TypeB->new(@_); } else { return $class->TypeA->new(@_); } }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|