NAME
Mojolicious::Plugin::AutoRoute - Mojolicious Plugin to create routes automatically
CAUTION
This is beta release. Implementation will be changed without warnings.
SYNOPSIS
# Mojolicious
$self->plugin('AutoRoute');
# Mojolicious::Lite
plugin 'AutoRoute';
DESCRIPTION
Mojolicious::Plugin::AutoRoute is a Mojolicious plugin to create routes automatically.
Routes corresponding to URL is created .
TEMPLATES ROUTES
templates/auto/index.html.ep # /
/foo.html.ep # /foo
/foo/bar.html.ep # /foo/bar
/foo/bar/baz.html.ep # /foo/bar/baz
If you like PHP
, this plugin is very good. You only put file into auto
directory.
OPTIONS
route
route => $route;
You can set parent route if you need. This is Mojolicious::Routes object. Default is $app-
routes>.
top_dir
top_dir => 'myauto'
Top directory. default is auto
.
METHODS
Mojolicious::Plugin::AutoRoute inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register($app);
Register plugin in Mojolicious application.