Dancer2::Template::Xslate - Text::Xslate template engine for Dancer2
config.yaml:
config.yaml
template: Xslate engines: template: Xslate: { path: "views" }
A Dancer 2 application:
use Dancer2; get /page/:number => sub { my $page_num = params->{number}; template "foo.tx", { page_num => $page_num }; };
Renders a template. $template can be one of:
$template
a string of the path to a template file (*.tx, not *.tt like the core Dancer2 template engines)
a reference to a string containing prerendered template content
Xslate rendering engine for Dancer 1.
Richard Simões <rsimoes AT cpan DOT org>
<rsimoes AT cpan DOT org>
Copyright © 2013 Richard Simões. This module is released under the terms of the MIT License and may be modified and/or redistributed under the same or any compatible license.
To install Dancer2::Template::Xslate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Template::Xslate
CPAN shell
perl -MCPAN -e shell install Dancer2::Template::Xslate
For more information on module installation, please visit the detailed CPAN module installation guide.