NAME
Leyland::Parser - Provides the sweet REST syntax for Leyland controller routes
VERSION
version 1.000001
SYNOPSIS
# 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;
DESCRIPTION
This module is meant to be used by <Leyland controllers|Leyland::Controller>. It exports Leyland's sweet syntax for creating routes and prefixes.
AUTHOR
Ido Perlmuter, <ido at ido50.net>
ACKNOWLEDGMENTS
Paul Driver, author of Flea, from which I have learned how to do this.
BUGS
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.
SUPPORT
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
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
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.