Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Looks like passing it to the objects as an argument is the preffered solution. My only issue with that is that I have a relatively large object hierarchy, with something similar to the following objects: Yes, passing is slightly more typing, but if you don't, then you're accessing a global variable -- which is worse? The following might shed a little light Why Singletons are Evil - Being Scott Densmore - Site Home - MSDN Blogs , Use your singletons wisely ; Know when to use singletons, and when to leave them behind So a global app configuration is common use of a singleton ... I've used it, I've seen it used ... I don't really have an informed opinion :) In reply to Re^2: Access to single object from multiple other objects
by Anonymous Monk
|
|