Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by xafwodahs (Scribe)
on Nov 26, 2002 at 22:02 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found