There's more than one way to do things | |
PerlMonks |
Re: Object Oriented configuration valuesby IlyaM (Parson) |
on Feb 10, 2003 at 12:55 UTC ( [id://234102]=note: print w/replies, xml ) | Need Help?? |
To my taste application object and configuration object are quite distinct things so I would not mix them. Personally I'd make application object a facade to configuration object:
Here $object->config returns config object. One advantage of this method is that fixes your problem with possible method and config variables name collisions. It is also worth to mention that you are probably reinventing the wheel. AppConfig provides similar OO inteface to config files (i.e. config vars as methods)
--
In Section
Meditations
|
|