Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Dynamic Class Loading, Compilation, & Speed

by zwon (Abbot)
on Mar 06, 2010 at 22:56 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://827172]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-03-19 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found