FAQ
"Hailin" == Hailin Hu writes:
Hailin> Finally, something like below works for me.

Hailin> my $apache = $c->engine->env->{'psgi.input'}; #
Hailin> Apache2::RequestRec $apache->user( $username );

Hailin> I supposed that an accessor of apache should be a method instead
Hailin> of a key of hash. Is this the right way to retrieve the
Hailin> apache/mod_perl object?

No it's not, this ties your application to a specific backend server
implementation (which is what caused your problem in the first
place). Whenever you need to access $c->engine->env, you should be applying a
Plack::Middleware to your .psgi instead.

--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edencardim.com http://www.shadowcat.co.uk/servers/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 6 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 20, '12 at 2:42a
activeApr 23, '12 at 10:41a
posts6
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase