Discipulus has asked for the wisdom of the Perl Monks concerning the following question:

estimated monks

I recive this and other errors launcing Tk perl scripts:
why? I tried to fix them manually but seems a neverending process... I have reinstalled Tk using ppm and the same happens..

Bareword "NORMAL_BG" not allowed while "strict subs" in use at C:/Perl +/site/lib/Tk/Derived.pm line 3 42. Bareword "BLACK" not allowed while "strict subs" in use at C:/Perl/sit +e/lib/Tk/Derived.pm line 349. Compilation failed in require at (eval 6) line 3.
any suggestion ?

thks in advance lor*

Replies are listed 'Best First'.
Re: Tk errors on actPerl 5.8 win2000
by eserte (Deacon) on Mar 30, 2004 at 12:23 UTC
    This looks like a bad Tk installation. Or you have accidentally an own Tk.pm which masks the original one.
Re: Tk errors on actPerl 5.8 win2000
by zentara (Cardinal) on Mar 30, 2004 at 14:47 UTC
    I've seen that alot too, on Linux. Also I see an error for forgetting the - in front of options. It seems that earlier versions of Tk, let the programmer get away with some slop, like forgetting the - in front of options, or barewords. I switched to Tk804.026 and it has tightened up alot on the code, and was surprised to see alot of scripts which used to run error free, now demand more precision.

    I'm not really a human, but I play one on earth. flash japh
Re: Tk errors on actPerl 5.8 win2000
by Grygonos (Chaplain) on Mar 30, 2004 at 14:02 UTC

    I'm assuming those barewords are not found in your program are they? If they aren't it does sound like some kind of bad Tk install, if they are then you probably just defined widget attributes w/ barewords rather than quoted 'BLACK' and 'NORMAL_BG'


    Grygonos
Re: Tk errors on actPerl 5.8 win2000
by DaWolf (Curate) on Mar 30, 2004 at 18:09 UTC
    Sorry people, but I disagree on all posts in this node, including the node itself.

    I've seen this error msgs on other scripts not only in Tk ones.

    This is simply a strict error. You are doing something that strict doesn't allow you to do. Comment the use strict; line of your code and you'll see that the error will disappear.

    Best regards,

    my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");
      Sorry, but I have to disagree. The error originates in an internal Tk module (Tk/Derived.pm). So it does not make any difference if the original poster had strict on or off.