Well, I handle it this way:
- A separate config class (with mass export ->export(@list))
- A separate logging class
How I use them depends on the module. If it's an internal module fixed into a project, I tend to keep the Config-Information by the package, not by an object, so that every part of the project can (transparently) access the configuration just by use'ing the Config-Module.
If /it is/ a standalone module, I mostly initialize them at creation time, e.g.
my $object = new ModuleName(
option1 => value1,
option2 => value2,
);
and handle the configuration isolated in the module. Maybe it get's additional cget/cset-methods.
hth,p
Ordinary morality is for ordinary people. -- Aleister Crowley