X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FWeb%2FSimple.pm;h=8474d41c5465d884e830d15610e071ed421a5062;hb=54a23c547c994bcd6ebc1a4183be74d1905cc8eb;hp=715cd3ee0b26046b4743daee00a103da2d28e0a5;hpb=29c7cff1f58f69c3b70e093ea9406f1dfe4d4a7a;p=catagits%2FWeb-Simple.git diff --git a/lib/Web/Simple.pm b/lib/Web/Simple.pm index 715cd3e..8474d41 100644 --- a/lib/Web/Simple.pm +++ b/lib/Web/Simple.pm @@ -6,7 +6,7 @@ use warnings::illegalproto (); use Moo (); use Web::Dispatch::Wrapper (); -our $VERSION = '0.020'; +our $VERSION = '0.022'; sub import { my ($class, $app_package) = @_; @@ -245,12 +245,14 @@ route is to provide a Dancer like key-value list: my $self = shift; ( '.html' => sub { response_filter { $self->render_zoom($_[0]) } }, - '/user/*' => sub { $self->users->get($_[1]) }< + '/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: @@ -860,6 +862,10 @@ Andrew Rodland (hobbs) Robert Sedlacek (phaylon) +Hakim Cassimally (osfameron) + +Karen Etheridge (ether) + =head1 COPYRIGHT Copyright (c) 2011 the Web::Simple L and L