Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by xafwodahs (Scribe)
on Nov 26, 2002 at 22:02 UTC ( #215949=note: print w/replies, xml ) Need Help??


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

When I switch the 'use' to a 'require', I can indeed determine if the module is not installed and catch that.

However, if the module *is* installed, the Tk code fails to function. There are no errors or anything - the script just exits. I actually placed a 'print' after the MainLoop call, and I see the print output.

It seems to make no difference whether I call Tk->import;
It seems to make no difference if I place Tk:: before the tk subroutines.

bizarre...
  • Comment on Re: Re: using 'use' conditionally (require instead of use)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-05-24 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?