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

Re: Inheritance based on input

by moritz (Cardinal)
on Oct 06, 2010 at 19:36 UTC ( #863860=note: print w/ replies, xml ) Need Help??


in reply to Inheritance based on input

Since one module is not object oriented, inheriting from it doesn't make sense.

If it follows a pattern that can be automatically wrapped into an OO fashion, you can create an automatic wrapper based on AUTOLOAD (see perlsub).

Instead of magically inheriting from one class or another, it might be easier to have an attribute that stores the device driver in question, and then work with delegation from there on.

Perl 6 - links to (nearly) everything that is Perl 6.


Comment on Re: Inheritance based on input
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-09-23 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls