DEV Community

Yuki Kimoto - SPVM Author
Yuki Kimoto - SPVM Author

Posted on

Mojolicious::Plugin::AutoRoute 0.23 is released - Catch up with Mojolicious 9.0

Mojolicious::Plugin::AutoRoute is the module to create routes automatically. If you have most static-like template files, this module is useful.

Catch up with Mojolicious 9.0.

https://metacpan.org/pod/Mojolicious::Plugin::AutoRoute

# Mojolicious
$self->plugin('AutoRoute');

# Mojolicious::Lite
plugin 'AutoRoute';

# With option
plugin 'AutoRoute', route => $r;
Enter fullscreen mode Exit fullscreen mode

Template files.

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
Enter fullscreen mode Exit fullscreen mode

enjoy!

Oldest comments (0)