Dancer2::Template::MojoTemplate - Mojo::Template wrapper for Dancer2
version 0.1.1
To use this engine, you may configure Dancer2 via config.yaml:
config.yaml
template: 'mojo_template' engines: mojo_template: auto_escape: 1 trim_mark: '-' prepend: 'my $t = $_[0];' template: "mojo_template"
Or you may also change the rendering engine on a per-route basis by setting it manually with set:
set
# code code code set template => 'mojo_template';
This is an interface between Dancer2's template engine abstraction layer and the Mojo::Template module.
Based on the Dancer::Template::MojoTemplate module.
In order to use this engine, use the template setting:
template: mojo_template
This can be done in your config.yml file or directly in your app code with the set keyword.
You can configure Mojo::Template :
template: 'mojo_template' engines: mojo_template: auto_escape: 1 trim_mark: '-' prepend: 'my $t = $_[0];'
Dancer2, Mojo::Template, http://mojolicio.us/
Nikita Melikhov <ver@0xff.su>
This software is copyright (c) 2013 by Nikita Melikhov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dancer2::Template::MojoTemplate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Template::MojoTemplate
CPAN shell
perl -MCPAN -e shell install Dancer2::Template::MojoTemplate
For more information on module installation, please visit the detailed CPAN module installation guide.