NAME
Dancer::Plugin::Controller - interface between a model and view
SYNOPSIS
# YourApp.pm
use Dancer ':syntax';
use Dancer::Plugin::Controller;
get '/' => sub {
controller(action => 'Index', template => 'index');
};
# YourApp::Action::Index.pm
sub main {
my ($class, $params) = @_; # $params - contains Dancer::params() and Dancer::vars()
...
return $template_params_hashref;
}
# config.yml
plugins:
"Controller":
# this is prefiix for module with implementation of action
action_prefix: 'MyActionPrefix' # default: 'Action'
# if you have problems with utf8, you may try use this option
force_utf8: 1 # default: 0
AUTHOR
Mikhail N Bogdanov <mbogdanov at cpan.org>