I don't think this will help: synapse0 is using a generic get() because s/he doesn't know what the keys of the config hash are going to be. explicit methods - or autoload fields - won't fit.
As for the question of how to make sure the contents of the config hash are only visible to the prescribed methods, I think the answer is probably a closure object, though i've never had occasion to use one this way. 'Closures as Objects' in perltoot should provide all that's needed.
In reply to Re: Re: Object insanity and data hiding
by thpfft
in thread Object insanity and data hiding
by synapse0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |