http://www.perlmonks.org?node_id=827172


in reply to Dynamic Class Loading, Compilation, & Speed

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(@_); }