Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Dynamic Class Loading, Compilation, & Speed

by zwon (Abbot)
on Mar 06, 2010 at 22:56 UTC ( #827172=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://827172]
QM waves to the peanut gallery, and wishes he were writing Perl today.
[choroba]: We're hiring!

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2017-06-29 10:04 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (658 votes). Check out past polls.