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.
In reply to Re^2: Object loading at runtime
by merlyn
in thread Object loading at runtime
by benrwebb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |