Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Using the perl modules depends upon the availability of another module.

by tye (Sage)
on Dec 08, 2005 at 09:19 UTC ( #515170=note: print w/replies, xml ) Need Help??


in reply to Using the perl modules depends upon the availability of another module.

require Module2 if ! eval "require Module1";

or

use if !eval("use Module1"), 'Module2';

but be warned that "You can't use a module's compile-time magic when you conditionally use the module...".

- tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2020-10-31 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (291 votes). Check out past polls.

    Notices?