Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

RE: RE: Checking to see if a particular Module is installed

by merlyn (Sage)
on Aug 11, 2000 at 15:23 UTC ( [id://27491]=note: print w/replies, xml ) Need Help??


in reply to RE: Checking to see if a particular Module is installed
in thread Checking to see if a particular Module is installed

Slightly simpler:
eval 'require GD'; if ($@) { # problems with GD, fall back to non-GD } else { # we have GD, go for it! }
There's no point in using use, because you can't affect the compile-time imports at runtime if it's not there!

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found