NAME
OX::RouteBuilder::HTTPMethod - OX::RouteBuilder which routes to a method in a controller based on the HTTP method
VERSION
version 0.02
SYNOPSIS
package MyApp;
use OX;
has controller => (
is => 'ro',
isa => 'MyApp::Controller',
);
router as {
route '/' => 'controller';
};
DESCRIPTION
This is an OX::RouteBuilder which allows to a controller class based on the HTTP method used in the request. The action_spec should be a string corresponding to a service which provides a controller instance. When a request is made for the given path, it will look in that class for a method which corresponds to the lowercased version of the HTTP method used in the request (for instance, get, post, etc). If no method is found, it will fall back to looking for a method named any. If that isn't found either, an error will be raised.
AUTHORS
Stevan Little <stevan.little at iinteractive.com>
Jesse Luehrs <doy at cpan dot org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.