Dancer2::Template::Mustache - Wrapper for the Mustache template system
version 0.0.1
# in config.yml template: mustache # in the app get '/style/:style' => sub { template 'style' => { style => param('style') }; }; # in views/style.mustache That's a nice, manly {{style}} mustache you have there!
This module is a Dancer2 wrapper for Template::Mustache.
For now, the extension of the mustache templates must be .mustache.
.mustache
Partials are supported, as are layouts. For layouts, the content of the inner template is sent via the usual content template variable. So a typical mustached layout would look like:
<body> {{{ content }}} </body>
engines: template: mustache: cache_templates: 1
Bu default, the templates are only compiled once when first accessed. The caching can be disabling by setting cache_templates to 0.
cache_templates
0
The Mustache templating system: http://mustache.github.com/
Dancer::Template::Handlebars - Dancer 1 support for Handlebars, a templating system that is a superset of Mustache.
Dancer::Template::Mustache - the original, Dancer 1 module.
Yanick Champoux <yanick@babyl.dyndns.org>
This software is copyright (c) 2018 by Yanick Champoux.
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::Mustache, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Template::Mustache
CPAN shell
perl -MCPAN -e shell install Dancer2::Template::Mustache
For more information on module installation, please visit the detailed CPAN module installation guide.