my $case = new Case1(...); ... print $case->xml; Package Guts; sub new { ... } sub xml { return '...'; } Package Case1; BEGIN { @Case1::ISA = qw(Guts) } sub xml { my $self = shift; return '<case1>' . $self->SUPER::xml . '</case1>'; } Package Case2; BEGIN { @Case2::ISA = qw(Guts) } sub xml { my $self = shift; return '<case2>' . $self->SUPER::xml . '</case2>'; }
In reply to Re^2: Revisiting strict and @ISA
by Zen Seeker
in thread Revisiting strict and @ISA
by Zen Seeker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |