Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Checking for PERL Modules

by jlf (Scribe)
on Jul 19, 2002 at 18:48 UTC ( #183371=note: print w/replies, xml ) Need Help??


in reply to Checking for PERL Modules

Try using eval and require:

# $module is the module you're checking for print "module $module is ", eval("require $module") ? "present\n" : "absent\n";
Josh

Replies are listed 'Best First'.
Re: Re: Checking for PERL Modules
by kidd (Curate) on Jul 19, 2002 at 18:52 UTC
    WOW!!! That seems easy...thanks for your replies, that was exactly what I was looking for...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2020-11-24 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?