Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Require - Module inclusion

by valdez (Monsignor)
on Mar 18, 2007 at 09:54 UTC ( #605341=note: print w/replies, xml ) Need Help??


in reply to Require - Module inclusion

I would use UNIVERSAL::require:

use UNIVERSAL::require; my $class = 'XX::XDC::raja'; require $class or die "can't require '$class': $@"; $class->new;

Ciao, Valerio

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://605341]
help
Chatterbox?
[Lady_Aleena]: huck, I was thinking more along the lines of just getting all my .pm files, iterating over them, and making a big ol' hash or something.
[LanX]: yes you need at least to compile them
[LanX]: runtime effects are not covered

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-05-27 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?