in reply to Re: Program configuration in the OOP world
in thread Program configuration in the OOP world
Don't despair. Put together the Class::Singleton and AppConfig suuguestions. Then you can just have:
package Some::Module; use MyConfig; ## ... sub do_something { my $self = shift; my $config = MyConfig->instance; $self->_blah_de_blah() if $config->do_blah(); return $self->bloop() unless $config->no_bloop(); }
Nobody had to pass anyone else anything.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Program configuration in the OOP world
by lachoy (Parson) on Apr 10, 2002 at 14:38 UTC |