use warnings FATAL => 'all';
use 5.008;
-our $VERSION = '0.001';
+our $VERSION = '0.002';
sub setup_all_strictures {
strict->import;
*{"${app_package}::default_config"} = sub {
$app_package->_setup_default_config(@_);
};
+ *{"${app_package}::PSGI_ENV"} = sub () { -1 };
*{"${app_package}::self"} = \${"${app_package}::self"};
require Web::Simple::Application;
unshift(@{"${app_package}::ISA"}, 'Web::Simple::Application');
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