in reply to "individually" override a super class's object methods
You need to alter the behavior of the sub. The derived class code looks like:
package MyChild; use strict; use vars qw/@ISA/; @ISA = qw/MyMother/; sub new { my ($class, @args) = @_; my $self = $class->SUPER::new(@args); bless $self, $class; $self; } sub modified { return 0 if $_[0]->{TYPE} == 1; $_[0]->SUPER::modified (); }
and the test code then prints:
1 0
|
|---|