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:f...@redhotpenguin.com]
Sent: Monday, July 11, 2011 5:35 PM
To: Michael Peters
Cc: James B. Muir; Jerry Pereira; modperl@perl.apache.org
Subject: Re: Best approach to store Application Configuration

On Mon, Jul 11, 2011 at 2:23 PM, Michael Peters <mpet...@plusthree.com> 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.

Reply via email to