[Catalyst] Re: Accesing PSGI 'env' from in a controller

Roberto Henriquez roberto at freekeylabs.com
Fri Oct 21 08:14:20 GMT 2011

On 10/21/11 08:46, Toby Corkindale wrote:
> Answering my own question here..
> Stuff was hidden in:
> $c->engine->env->{...};
> I know this isn't very portable, but it's for an internal app where
> being able to pass some extra info through from the plack middleware
> will be very helpfu.
> I'm curious though - How would you suggest such stuff is handled?
> cheers,
> Toby
> On 21 October 2011 17:11, Toby Corkindale<toby at dryft.net>  wrote:

I guess the "right" way to deal with this would be to wrap that code in 
a component which you'd later use from your Catalyst app, thus 
decoupling them and keeping your code portable.

For example, that's what Catalyst::Plugin::Session::PSGI aims to do. You 
access the session as usual and the "dirty" details are handled by the 
plugin and its config.


Roberto Henríquez
roberto at freekeylabs.com

More information about the Catalyst mailing list