[Catalyst] PerlSetVar $r->dir_config

Tim Keefer tkeefer at sunflowerbroadband.com
Mon Jul 25 21:20:25 CEST 2005

I see. However it doesn't seem to allow me to set environment variables
per <Location>. 

For example, I have one App that handles the
following locations: /my-app/foo /my-app/barr 

Basically, I'd like to set most of my configuration in the Apache
conf. I'd like to be able to give each location different environment
variables. With a typical mod_perl app $r->dir_config handles this by
passing its current SetVar or if not defined then
its parent value is passed.

I'd like to be able to do something like this, however it doesn't work. 

PerlOptions -SetupEnv
<Location /my-app>
  PerlSetEnv root "/var/www/template"

  SetHandler perl-script
  PerlHandler MyApp;

<Location /my-app/foo>
  PerlSetEnv root "/here"

<Location /my-app/bar>
  PerlSetEnv root "/there"

Can Catalyst support this behavior? 

 On Mon, 25 Jul 2005 19:06:18 +0200
Sebastian Riedel <sri at oook.de> wrote:

> Am 25.07.2005 um 18:58 schrieb Tim Keefer:
> > Anyone know if there's a Catalyst method that accomplishes the same
> > thing that $r->dir_config does? If not, how do I gain access to $r
> > ( Apache request object ) within a Catalyst app. I need to set  
> > variables
> > in the httpd.conf file and access them from the Catalyst app.
> Use environment variables, they are cross platform.
> --
> sebastian
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst

More information about the Catalyst mailing list