Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Conditional inheritance strategy

by jethro (Monsignor)
on Oct 27, 2010 at 13:05 UTC ( #867711=note: print w/replies, xml ) Need Help??


in reply to Conditional inheritance strategy

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://867711]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2020-12-02 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (41 votes). Check out past polls.

    Notices?