in reply to Re^2: Failing inheritance or what can make a Child disinherited ?
in thread Failing inheritance or what can make a Child disinherited ?
Put this method in your Child class. (hopefully you'll be able to call it.)
You'll want to call it from outside the class probably, perhaps just after creating the object instance. The output wont change unless you're messing with @ISA.sub isa_descent { my $self = shift @_; my ($class) = @_; print "\npackage: $class\n"; no strict 'refs'; my @ancestors = @{ 'main::' . $class . '::ISA' }; use strict; foreach my $ancestor ( @ancestors ) { print "...ancestor: $ancestor\n"; $self->isa_descent($ancestor); } }
$o->isa_descent(ref $o);
|
|---|