Leyland::Parser - Provides the sweet REST syntax for Leyland controller routes
# in a controller of your app (check out L<Leyland::Manual::Controllers/"ROUTES"> # for more info on creating routes): package MyApp::Controller::Stuff; use Moo; use Leyland::Parser; use namespace::clean; prefix { '/stuff' } get '^/$' { # $self and $c are automatically available for you here $c->template('stuff.html'); } post '^/$' returns 'application/json' { # do stuff } 1;
This module is meant to be used by <Leyland controllers|Leyland::Controller>. It exports Leyland's sweet syntax for creating routes and prefixes.
Ido Perlmuter, <ido at ido50.net>
<ido at ido50.net>
Paul Driver, author of Flea, from which I have learned how to do this.
Please report any bugs or feature requests to bug-Leyland at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Leyland. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-Leyland at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Leyland::Parser
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Leyland
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Leyland
CPAN Ratings
http://cpanratings.perl.org/d/Leyland
Search CPAN
http://search.cpan.org/dist/Leyland/
Copyright 2010-2014 Ido Perlmuter.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Leyland, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Leyland
CPAN shell
perl -MCPAN -e shell install Leyland
For more information on module installation, please visit the detailed CPAN module installation guide.