Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Dynamically requiring a module

by fishmonger (Chaplain)
on Jan 23, 2014 at 15:16 UTC ( #1071769=note: print w/replies, xml ) Need Help??


in reply to Dynamically requiring a module

Another option besides what has already been given would be to use Module::Load.

use Module::Load; my $config = 'Config'; my $settings = 'Settings'; my $ver = 3; load $ver > 2 ? $config : $settings;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071769]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2017-09-25 03:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (276 votes). Check out past polls.

    Notices?