Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: use module if condition is met

by tcf22 (Priest)
on Jan 23, 2004 at 17:06 UTC ( #323608=note: print w/replies, xml ) Need Help??


in reply to use module if condition is met

Perhaps something like this:
if($type eq 'x'){ eval "use Some::Module"; } eval { mysubtocheck(); }; if($@){ #Sub ran }else{ #Sub not present or died }

- Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://323608]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-07-26 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (398 votes). Check out past polls.