Terse::App - Lightweight MVC applications.
Version 0.104
.. My/App.pm package My::App; use base 'Terse::App'; sub login :any { return 1; } sub auth_prevent :any(auth) { return 0; } sub auth :get :post { return 1; } ... My/App/Controller/Hello.pm package My::App::Controller::Hello; use base 'Terse::Controller'; sub hello :get { ... #1 } sub world :get { ... #2 } ... My/App/Controller/Hello/World.pm package My::App::Controller::Hello::World; use base 'Terse::Controller'; sub build_controller { $_[0]->required_captured = 2; $_[0]->capture = 'hello/(.*)/world/(.*)'; $_[0]; } sub world :get { $_[1]->respone->captured = $_[1]->captured; ... #3 } .... MyApp.psgi ... use Terse; use My::App; our $app = My::App->start(); sub { my ($env) = (shift); Terse->run( plack_env => $env, application => $app, ); }; .... plackup MyApp.psgi GET http://localhost:5000/hello?id=here&other=params #1 GET http://localhost:5000/hello?req=world #2 GET http://localhost:5000/hello/abc/world/123 #3
LNATION, <email at lnation.org>
<email at lnation.org>
Terse.
To install Terse, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Terse
CPAN shell
perl -MCPAN -e shell install Terse
For more information on module installation, please visit the detailed CPAN module installation guide.