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

Re: Best way to check for installed module

by extremely (Priest)
on Apr 04, 2002 at 20:47 UTC ( #156765=note: print w/ replies, xml ) Need Help??


in reply to Best way to check for installed module

The canonical way from the Cookbook is simply:

BEGIN { unless (eval "require MyModule") { warn "Eeek! no MyModule: $@"; } } BEGIN { unless (eval "use MyModule") { warn "Eeek! no MyModule: $@"; } }

--
$you = new YOU;
honk() if $you->love(perl)


Comment on Re: Best way to check for installed module
Download Code
Replies are listed 'Best First'.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-08-05 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (81 votes), past polls