Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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
Re: Re: Best way to check for installed module
by NodeReaper (Curate) on Apr 05, 2002 at 07:16 UTC

    Reason: (Biker) DELETE on authors request - Will I ever learn to read?

    For more information on this node visit: this

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 taking refuge in the Monastery: (11)
As of 2014-09-23 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls