Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Testing for a module's presence

by vek (Prior)
on Feb 06, 2005 at 06:07 UTC ( [id://428450]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $HAVE_MODULE = eval 'require Some::Module; 1' ? 1 : 0;
    
  2. or download this
    if ($HAVE_MODULE) {
       do_stuff();
    } else {
       do_something_else();
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-25 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found