Document ENV feature
nperez [Thu, 10 Jun 2010 22:03:18 +0000 (17:03 -0500)]
lib/Web/Simple.pm

index 2cc4ae2..c899c3a 100644 (file)
@@ -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