go ahead... be a heretic | |
PerlMonks |
Re: OO-style questionby merlyn (Sage) |
on Dec 30, 2000 at 00:46 UTC ( [id://48892]=note: print w/replies, xml ) | Need Help?? |
If B doesn't seem natural responding to A's methods, then B is not an A, and you can't use inheritance. So more likely, B "has an" A, and some of B's methods will be implemented by delegating those to the A instance within B.
But that brings back an odder question. Are B and A really both subclasses of the unnamed base class? Perhaps that's where your problem is. -- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|