From: nperez Date: Thu, 10 Jun 2010 22:03:18 +0000 (-0500) Subject: Document ENV feature X-Git-Tag: v0.003~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Simple.git;a=commitdiff_plain;h=24175cb5e9ca7488610ff95014989e20bee55334 Document ENV feature --- diff --git a/lib/Web/Simple.pm b/lib/Web/Simple.pm index 2cc4ae2..c899c3a 100644 --- a/lib/Web/Simple.pm +++ b/lib/Web/Simple.pm @@ -490,6 +490,16 @@ from subroutine prototypes, so this is equivalent to sub (GET+/user/*) { +=head3 Accessing the PSGI env hash + +To gain the benefit of using some middleware, specifically +Plack::Middleware::Session access to the ENV hash is needed. This is provided +in arguments to the dispatched handler. You can access this hash with the +exported +ENV constant. + + sub (GET + /foo + ?some_param=) { + my($self, $some_param, $env) = @_[0, 1, +ENV]; + =head1 EXPORTED SUBROUTINES =head2 default_config