[Catalyst] Best place to set environment variables

Jonathan Rockway jon at jrock.us
Thu Oct 12 06:20:27 CEST 2006


This would make a nice plugin:  Catalyst::Plugin::Setenv.

The YAML would look like:

environment:
  FOO_BAR: 1
  SOMETHING_ELSE: a value

Regards,
Jonathan Rockway

On Wednesday 11 October 2006 11:01, Bill Moseley wrote:
> On Wed, Oct 11, 2006 at 01:10:57PM +0200, Marc Logghe wrote:
> > Hi,
> > What is The Best Way (TM) to configure environment variables in Catalyst
>
> I have my app's setup() method read the yaml file.  That would be an
> easy place to set environment vars that are stored in the yaml file.
>
> But, I use a script to start my application when running under Apache.
> That script reads my config.yml file and then sets environment
> variables, creates httpd.conf, and starts the server.  My config.yml
> has default settings, but also has a section which defines multiple
> server configurations (dev, testing, staging, production) that can
> override the default settings.  Changes from the defaults are passed
> in environment variables from this script.

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20061011/2e01272c/attachment.pgp 


More information about the Catalyst mailing list