Created
December 8, 2010 04:39
-
-
Save s-aska/732892 to your computer and use it in GitHub Desktop.
よく使うDispatcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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