Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Testing for a module's presence

by sandfly (Beadle)
on Feb 11, 2005 at 23:09 UTC ( #430343=note: print w/replies, xml ) Need Help??


in reply to Re: Testing for a module's presence
in thread Testing for a module's presence

"require" also better because it doesn't call import(). The module code still gets executed though. Typically, "require"d modules just create subs in their own package, but a badly-behaved module could in principle mess up any namespace.

If you want to "use" a module at runtime, you can eval a quoted string:
eval "use $mymodule";<br>print $@ if $@;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430343]
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 2022-01-28 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (73 votes). Check out past polls.

    Notices?