An additional puzzle: why doesn't this work?Because perl looks at the code $self->SUPER::tellName(), and says, ah, you want to call the tellName method in the superclass of the current package. It doesn't take $self into account at all. To do that, you need to go beyond what perl itself provides and use something like SUPER or NEXT.if ( ref($self) eq 'person') { $self->tellName(); } if ( ref($self) eq + 'child') {$self->SUPER::tellName();}
In reply to Re^2: my $self is stumped!
by ysth
in thread my $self is stumped!
by headybrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |