Mojolicious::Plugin::AttributeMaker::Extension::Routing - Catalyst like routing in you Mojolicious app!
Version 0.01
Example app namespace : MyApp Example app contrioller namespace : MyApp::Controller
Example:
package Simple; sub homepage :Local { ... } http://*:port/simple/homepage
A local atrribute ignore arguments
package Simple; sub homepage :Path('user_home') { ... } http://*:port/simple/user_home
A path atrribute has one mandatory argument
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
To install Mojolicious::Plugin::AttributeMaker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::AttributeMaker
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::AttributeMaker
For more information on module installation, please visit the detailed CPAN module installation guide.