correct POD on ** match
[catagits/Web-Simple.git] / lib / Web / Simple.pm
index 0b7a1f7..db83535 100644 (file)
@@ -6,7 +6,7 @@ use warnings::illegalproto ();
 use Moo ();
 use Web::Dispatch::Wrapper ();
 
-our $VERSION = '0.009';
+our $VERSION = '0.011';
 
 sub import {
   my ($class, $app_package) = @_;
@@ -198,6 +198,17 @@ However, generally, instead of that, you return a set of dispatch subs:
     ...
   }
 
+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).
@@ -311,9 +322,9 @@ also match more than one part:
 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) {
 
@@ -695,7 +706,7 @@ John Napiorkowski (jnap) <jjn1056@yahoo.com>
 
 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>
 
@@ -709,7 +720,7 @@ Robin Edwards <robin.ge@gmail.com>
 
 =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