Mojolicious::Plugin::PugRenderer - Template::Pug renderer plugin
# Mojolicious
$self->plugin('PugRenderer');
$self->plugin(PugRenderer => {name => 'foo'});
$self->plugin(PugRenderer => {name => 'bar', template => {basedir => 'templates'}});
# Mojolicious::Lite
plugin 'PugRenderer';
plugin PugRenderer => {name => 'foo'};
plugin PugRenderer => {name => 'bar', template => {basedir => 'templates'}};
Mojolicious::Plugin::PugRenderer is a renderer for Template::Pug templates.
Mojolicious::Plugin::PugRenderer supports the following options.
# Mojolicious::Lite
plugin PugRenderer => {name => 'foo'};
Handler name, defaults to pug
.
# Mojolicious::Lite
plugin PugRenderer => {template => {basedir => 'templates'}};
Attribute values passed to Template::Pug object used to render templates.
Mojolicious::Plugin::PugRenderer inherits all methods from Mojolicious::Plugin and implements the following new ones.
$plugin->register(Mojolicious->new);
Register plugin in Mojolicious application.