RE: Best approach to store Application Configuration

"James B. Muir" <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <527C4914F1B2EA47B38422DE0FA05A650651BEE3C2@DH201.DHMCMaster.DH.Hitchcock.org>
The PerlSetVar overhead occurs on every request, whereas the overhead associated with using the custom configuration occurs once when Apache is started.
-James


-----Original Message-----
From: Fred Moyer [mailto:[email protected]]
Sent: Monday, July 11, 2011 5:35 PM
To: Michael Peters
Cc: James B. Muir; Jerry Pereira; [email protected]
Subject: Re: Best approach to store Application Configuration

On Mon, Jul 11, 2011 at 2:23 PM, Michael Peters <[email protected]> wrote:
> On 07/11/2011 05:16 PM, James B. Muir wrote:
>>
>> This page describes pretty well how to set up custom configuration
>> directives; perhaps helpful?
>>
>> http://perl.apache.org/docs/2.0/user/config/custom.html
>
> I would almost always avoid this kind of configuration and go with an
> external configuration file. Every project of any decent size will have some
> scripts or processes that don't run under mod_perl and thus can't use this
> apache-only configuration.

This kind of configuration has the advantage of avoiding the overhead
associated with PerlSetVar if I recall correctly.  The downside is
that the custom config directives can be a bit tricky to setup
correctly.

> As for configuration in Perl if I were starting a new project, I'd probably
> go with something like Config::Any and then pick a backend format.

+1

IMPORTANT NOTICE REGARDING THIS ELECTRONIC MESSAGE:

This message is intended for the use of the person to whom it is addressed and may contain information that is privileged, confidential, and protected from disclosure under applicable law.  If you are not the intended recipient, your use of this message for any purpose is strictly prohibited.  If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.