in reply to Re^2: Multiple Inheritance - Howto marry tie::refhash::nestable with class::singleton
in thread Multiple Inheritance - Howto marry tie::refhash::nestable with class::singleton
merlyn isn't saying you shouldn't have a global repository for information. What he is saying is that you should be exporting functions/methods that the code can call to access said information. Then, if you ever need to log something or modify something as it's being set or retrieved, you have one place to do that. Or, let's say you're moving from a file-based system to a DB-based system.
Bite the bullet and change everything to a pure singleton and call the methods to get at or set the data. This is even more important with setting data. (Though, this is starting to sound more like a stash vs. a configuration object ...)
|
|---|