עידו פרלמוטר (Ido Perlmuter) > Leyland > Leyland::Parser

Download:
Leyland-0.001007.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Leyland::Parser - Provides the sweet REST syntax for Leyland controller routes

VERSION ^

version 0.001007

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 Moose;
        use Leyland::Parser;
        use namespace::autoclean;

        prefix { '/stuff' }

        get '^/$' {
                # $self and $c are automatically available for you here
                $c->template('stuff.html');
        }

        post '^/$' returns 'application/json' {
                # do stuff
        }

        __PACKAGE__->meta->make_immutable;

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:

LICENSE AND COPYRIGHT ^

Copyright 2010-2011 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.

syntax highlighting: