On Wed, 2004-12-22 at 13:15 +0100, Henning Meyer wrote:
> I understand this - but I want to use Apache::Registry for 
> performance-reasons. How can I get different configurations in different 
> Versions of my system?
> Should I use something like Config::Tiny?
> Or can I use Apache::PerlRun just for my config.pl - which I include via
> require 'config.pl';
> ?

There are many ways to do this.

1. Pull the values in with 'do config.pl' instead of require.  That will
read the script every time.  It will also have a performance penalty
because of this.

2. Put the data in a hash indexed by your application name:
$c{'project_name'} instead of just $c.  The project name could be set in
the conf file via PerlSetVar or in your script.  Use that name when
writing or reading the config data.

3. Put it in different packages.  This is just a variation of #2.

4. Read the config each time using some config thing like Config::Tiny.
This will have a performance hit like #1.

That should give you an idea.

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to