in reply to Multiple instances of the same base class
Note the use of the SUPER pseudoclass -- see Overridden Methods in the same document. If your parent class is incautious about its blessing, your object will be in the wrong class, but that would have already been true with your old code.package BasicX::AAA1; use BasicX; our @ISA = qw(BasicX); sub new { my $class = shift; my $args = shift; my $newclass = $class->SUPER::new( { DEBUG => $args->{DEBUG}, SETTTING1 => $args->{SETTING1}, } ); return $newclass; } 1;
|
|---|