PlackX::RouteBuilder - Minimalistic routing sugar for your Plack
# app.psgi use PlackX::RouteBuilder; my $app = router { get '/api' => sub { my $req = shift; my $res = $req->new_response(200); $res->body('Hello world'); $res; }, post '/comment/{id}' => sub { my ($req, $args) = @_; my $id = $args->{id}; my $res = $req->new_response(200); $res; }, any [ 'GET', 'POST' ] => '/any' => sub { my ( $req, $args ) = @_; my $res = $req->new_response(200); $res->body('any'); $res; }, };
PlackX::RouteBuilder is Minimalistic routing sugar for your Plack
This source is in Github:
http://github.com/dann/p5-plackx-routebuilder
Many thanks to:
dann <techmemo@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install PlackX::RouteBuilder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PlackX::RouteBuilder
CPAN shell
perl -MCPAN -e shell install PlackX::RouteBuilder
For more information on module installation, please visit the detailed CPAN module installation guide.