Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: OOP - Sharing class methodsby lachoy (Parson) |
on Aug 14, 2002 at 18:50 UTC ( [id://190189]=note: print w/replies, xml ) | Need Help?? |
If the code can be used by both ClassOne and ClassTwo, why not make UtilityClassOne with this (and possibly other) methods that can be used by both? Inheritance is a possibility, but this doesn't sound like an 'is a' sort of relationship and IMO inheritance gets confusing if it's used in places where composition is more appropriate (e.g., 'has a'). Chris
In Section
Seekers of Perl Wisdom
|
|