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:
my $object = OurApp->new(...); print $object->config->base_directory, "\n";
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)
--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org
In reply to Re: Object Oriented configuration values
by IlyaM
in thread Object Oriented configuration values
by trs80
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |