Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 cooling their heels in the Monastery: (6)
As of 2020-02-17 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (71 votes). Check out past polls.

    Notices?