Your problem is that
$PATTERN in
new() is considered a package variable (as it hasn't been declared lexically) so
new() is looking up
$Thingy::PATTERN and, understandably, is not finding it. A possible solution would be to implement your derived class constructors like so
{
package Rubber;
@ISA = qw( Thingy );
$PATTERN = q( ... );
sub new {
local $Thingy::PATTERN = $PATTERN;
$_[0]->SUPER::new(@_[1 .. $#_]);
}
}
HTH
_________
broquaint