Skip to content

Instantly share code, notes, and snippets.

@s-aska s-aska/Dispatcher
Created Dec 8, 2010

Embed
What would you like to do?
よく使うDispatcher
package MasterSpark::Web::Dispatcher;
use strict;
use warnings;
use Amon2::Web::Dispatcher::RouterSimple;
connect '/{action}' => { controller => 'Root' };
connect '/{controller}/{action}' => {}, {
on_match => sub {
my($env, $match) = @_;
$match->{controller} = ucfirst $match->{controller};
return 1;
}
};
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.