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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-07-04 17:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls