Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Testing for a module's presence

by broquaint (Abbot)
on Feb 06, 2005 at 04:36 UTC ( #428421=note: print w/replies, xml ) Need Help??


in reply to Testing for a module's presence

You could use Module::Locate for the job e.g
use Module::Locate 'locate'; print "Couldn't find Some::Module" unless locate 'Some::Module';
This code will return the path to the module if it is on the system or false if not. Also it doesn't load the module it just checks for its presence in the same manner that perl's require does.
HTH

_________
broquaint

Replies are listed 'Best First'.
CPAN knows how
by adamk (Chaplain) on Feb 06, 2005 at 06:06 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2016-12-10 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (166 votes). Check out past polls.