Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: using 'use' conditionally (require instead of use)

by BUU (Prior)
on Nov 05, 2002 at 01:17 UTC ( [id://210362]=note: print w/replies, xml ) Need Help??


in reply to Re: using 'use' conditionally (require instead of use)
in thread using 'use' conditionally

Why bother evaling? Just do if($opt_g){require Tk;}

Replies are listed 'Best First'.
Re: Re: Re: using 'use' conditionally (require instead of use)
by chromatic (Archbishop) on Nov 05, 2002 at 05:48 UTC

    What if the require fails?

      Then you can't run with the -g mode and the user gets a good explanation as to why. I agree with BUU, drop the eval entirely.

              - tye

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found