in reply to class constants in derived classes

Your use vars syntax is broken. The only thing use vars can do is permit a package variable to be spelled without the colons when the current package is the same as the package variable's package.
use vars qw($PATTERN); $PATTERN = qr(...); ... ... if ($line =~ $PATTERN) { ... }
Perhaps you were confusing it with our, which in fairly recent Perl versions, permits a "my"-style declaration, but accesses a package variable rather than a lexical variable.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: class constants in derived classes
by leriksen (Curate) on Apr 03, 2003 at 23:19 UTC
    oh bugger - yes the example is wrong, but I do it right in the code I am trying to fix.