use Moo ();
use Web::Dispatch::Wrapper ();
-our $VERSION = '0.009';
+our $VERSION = '0.011';
sub import {
my ($class, $app_package) = @_;
...
}
+Well, a sub is a valid PSGI response too (for ultimate streaming and async
+cleverness). If you want to return a PSGI sub you have to wrap it into an
+array ref.
+
+ sub dispatch_request {
+ [ sub {
+ my $respond = shift;
+ # This is pure PSGI here, so read perldoc PSGI
+ } ]
+ }
+
If you return a subroutine with a prototype, the prototype is treated
as a match specification - and if the test is passed, the body of the
sub is called as a method any matched arguments (see below for more details).
and so on. To match an arbitrary number of parts, use -
sub (/page/**) {
+ my ($self, $match) = @_;
-This will result in an element per /-separated part so matched. Note that
-you can do
+This will result in a single element for the entire match. Note that you can do
sub (/page/**/edit) {
Josh McMichael <jmcmicha@linus222.gsc.wustl.edu>
-Justin Hunter <justin.d.hunter@gmail.com>
+Justin Hunter (arcanez) <justin.d.hunter@gmail.com>
Kjetil Kjernsmo <kjetil@kjernsmo.net>
=head1 COPYRIGHT
-Copyright (c) 2010 the Web::Simple L</AUTHOR> and L</CONTRIBUTORS>
+Copyright (c) 2011 the Web::Simple L</AUTHOR> and L</CONTRIBUTORS>
as listed above.
=head1 LICENSE