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

Re: object oriented Perl advice / constructor creation in child class

by Anonymous Monk
on Jul 10, 2018 at 12:17 UTC ( [id://1218239]=note: print w/replies, xml ) Need Help??


in reply to object oriented Perl advice / constructor creation in child class

If you want a module C to give you access to methods of objects A, B, and D, all under one roof – which seems strange to me – then your object C would instantiate instances of A, B, and D as private properties, then expose methods (of C) which under-the-hood "reflected" those calls to the various objects that it is stashing. Callers would not perceive this: they would only call methods of C, not knowing exactly how they are implemented. But this seems to contradict the "DRY" principle, since in every method of C you would be "repeating yourself."

Replies are listed 'Best First'.
Re^2: object oriented Perl advice / constructor creation in child class
by Anonymous Monk on Jul 11, 2018 at 13:58 UTC

    More useless drivel from something called "sundial".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-03-28 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found