We don't bite newbies here... much | |
PerlMonks |
Re: Conditional inheritance strategyby jethro (Monsignor) |
on Oct 27, 2010 at 13:05 UTC ( [id://867711]=note: print w/replies, xml ) | Need Help?? |
If I get you correctly, you want each object either to be inherited from My::XML or My::JSON, but that doesn't work, as inheritance is a configuration at the class level One solution would be to store a reference to an object of type My::XML or My::JSON into your objects and call methods from there. Or you could simply have two classes of type My::XML and My::JSON that both inherit from My
In Section
Seekers of Perl Wisdom
|
|