From: Arthur Axel 'fREW' Schmidt Date: Tue, 20 May 2014 19:17:04 +0000 (-0500) Subject: document method name style X-Git-Tag: v0.021~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Simple.git;a=commitdiff_plain;h=40e7878cc01f11b87dc14e7e7d871a12399a756d document method name style --- diff --git a/lib/Web/Simple.pm b/lib/Web/Simple.pm index d5ca0e2..a94c79d 100644 --- a/lib/Web/Simple.pm +++ b/lib/Web/Simple.pm @@ -246,11 +246,13 @@ route is to provide a Dancer like key-value list: ( '.html' => sub { response_filter { $self->render_zoom($_[0]) } }, '/user/*' => sub { $self->users->get($_[1]) }, + 'POST + %*' => 'handle_post', ) } This can be useful in situations where you are generating a dispatch table -programmatically, where setting a subroutines protoype is difficult. +programmatically, where setting a subroutines protoype is difficult. Note that +in the example above, C is a method that would be called. to render a user object to HTML, if there is an incoming URL such as: