in reply to OO-style question
To answer this question well, we need more concrete information so we can make a call as to whether A is a B, B is an A, A is a Base, B is a Base, etc.
But another option is that B can dispatch to A in any number of ways. The two simplest are:
I'll add that inheritance, especially in Perl, should be saved as a last resort. Perl's inheritance is just way too clumsy, being very all-or-nothing. - tye (but my friends call me "Tye")sub B::same { goto &A::same } # or *B::save= \&A::save;
|
---|