Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Dynamic Class Loading, Compilation, & Speed

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

Comment on Re: Dynamic Class Loading, Compilation, & Speed
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2016-02-12 12:25 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (397 votes), past polls