Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
An object oriented principial dilema arises from such redundancy - should the child object be responsible for it's location in the parent (knowing and/or maintaining)?
Some will argue that since the children heriarchly exist within the parent, then the responsibility should only be the parent's...
This is perhaps analogeous to the question of wether you should use method objects within sibling methods, or access the object internals directly.
Think about it.

In addition, perhaps Tie::RefHash may be of use for maintaing a hash of references to the child objects, within the parent. The parent can simply lookup child by it's object reference, and in the hash will be the coordinate values.

-nuffin
zz zZ Z Z #!perl

In reply to Re: Re: Re: Child objects querying parent objects about themselves by nothingmuch
in thread Child objects querying parent objects about themselves by vaevictus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-05-18 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?