NAME

Mojolicious::Plugin::AttributeMaker::Extension::Routing - Catalyst like routing in you Mojolicious app!

VERSION

Version 0.01

ATTRIBUTES

Example app namespace : MyApp Example app contrioller namespace : MyApp::Controller

Local

Example:

package Simple;
sub homepage :Local { ... }

http://*:port/simple/homepage

A local atrribute ignore arguments

Path

Example:

package Simple;
sub homepage :Path('user_home') { ... }

http://*:port/simple/user_home

A path atrribute has one mandatory argument

Global

Example:

sub homepage :Global { ... }

http://*:port/homepage

A global action defined in any controller always runs relative to your root. So the above is the same as:

 sub myaction :Path("/homepage") { ... }

But if you write this:

sub homepage :Global('/homepage_custom_url') { ... }

You will get this result:

http://*:port/homepage_custom_url