You can use Module::Load for loading module. It actually doing the same(not exactly the same) eval you do, but just looks nice. As for creating new object, I don't think it may be better.
use Module::Load; sub creator { my $class = shift; load $class; $class->new(@_); }
In reply to Re: Dynamic Class Loading, Compilation, & Speed
by zwon
in thread Dynamic Class Loading, Compilation, & Speed
by zerohero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |