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

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

by tye (Sage)
on Dec 08, 2005 at 09:19 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://515170]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-23 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found