Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by Anonymous Monk
on Jul 10, 2018 at 12:17 UTC ( #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."
  • Comment on Re: object oriented Perl advice / constructor creation in child class

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
Node Status?
node history
Node Type: note [id://1218239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2019-04-20 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (110 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!