http://qs1969.pair.com?node_id=210362


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