William G. Davis has asked for the wisdom of the Perl Monks concerning the following question:
Hi again monks.
What's the best way to store persistent information for an Apache/Mason app? I have three pieces of data that I need to store in a persistent way: the path for the base directory; a random salt to use for hashing (via MD5 or SHA); and the path for the directory containing DBM files.
At first I was using Mason attributes (<%attr> sections combined with the attr() and has_attr() component methods). But this was annoying and limiting, as attributes must be hard coded in the source code, loaded at compile time, and can't be changed after that. It required modification of the autohandler source during installation, where the attributes were declared, as well as a trick to make sure the autohandler wasn't used until after installation was complete.
Next I looked into dir_config->set() and Apache::Table, which seemed nice, but didn't last. Once I killed Apache, the dir_config() settings were lost.
Then I looked into Apache::ModuleConfig, which Slash uses, but in a way I can't quite figure out, since neither perldoc Apache::ModuleConfig or perldoc Apache shined any light on it, and perl.apache.org did help either.
What am I missing here? Any suggestions would be appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Advice on storage of Apache app configuration information?
by cleverett (Friar) on Oct 02, 2004 at 08:47 UTC | |
|
Re: Advice on storage of Apache app configuration information?
by TGI (Parson) on Oct 02, 2004 at 02:22 UTC | |
|
Re: Advice on storage of Apache app configuration information?
by Arunbear (Prior) on Oct 01, 2004 at 19:11 UTC | |
|
Re: Advice on storage of Apache app configuration information?
by dragonchild (Archbishop) on Oct 02, 2004 at 00:09 UTC | |
|
Re: Advice on storage of Apache app configuration information?
by William G. Davis (Friar) on Oct 04, 2004 at 00:48 UTC |