I think I'm going in circles. Sorry about the multiple postings.
The program barfs on 'use Tk' even though by the time I get to the 'use 
Tk' the Tk module should be installed.
I tried doing require Tk; import Tk;
but then I get this message:
Bareword "MainLoop" not allowed while "strict subs" in use at...

Is there a way to make perl not try to load the module until after it's 
detected that the module is not installed, and subsequently gone ahead 
and installed the module?
i.e. make the following code do what I want it to do ...

eval { require Tk };
if ($@) {
     system('perl -MCPAN -e \'CPAN::Shell->install("Tk")\'');
}
use Tk;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to