The actual problem is I have a baseclass A and two children B and C, each overriding a different method in A. How do I have D inherit from B and C and have both overriden methods without having D know about the innards of A, B, and C?
Um .... you don't. As you've framed it, it seems that D needs to know that B and C have overridden different methods and that it wants both. One way to get D to do what you want is for D to define those methods itself and call the appropriate ancestor:
# Say B overrode method foo() and C overrode method bar() package D; sub foo { &B::foo } sub bar { &C::bar }
In reply to Re: Decorator(?) classes and inheritance
by duff
in thread Decorator(?) classes and inheritance
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |