Plack::Middleware::Xslate - serve static templates with Plack
version 0.03
use Plack::Builder; builder { enable "Xslate", path => qr{^/}, root => 'root/templates/', pass_through => 1; $app; };
This middleware allows you to serve files processed as Text::Xslate templates. This is useful for serving sites that are essentially static content, but with a consistent structure (which can be pulled out into a single template to include, rather than duplicated across every page).
Configuration for this middleware is identical to Plack::Middleware::Static, with these additional options:
A hashref of arguments to pass to the Text::Xslate constructor. Note that you cannot pass a path argument here - it will be overridden by the root option.
path
root
A hashref of data to use when rendering the template. This will be passed to Text::Xslate->render every time a template is rendered.
Text::Xslate->render
No known bugs.
Please report any bugs through RT: email bug-plack-middleware-xslate at rt.cpan.org, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Plack-Middleware-Xslate.
bug-plack-middleware-xslate at rt.cpan.org
Plack::Middleware::Static
Plack::Middleware::TemplateToolkit
You can find this documentation for this module with the perldoc command.
perldoc Plack::Middleware::Xslate
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Plack-Middleware-Xslate
CPAN Ratings
http://cpanratings.perl.org/d/Plack-Middleware-Xslate
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Plack-Middleware-Xslate
Search CPAN
http://search.cpan.org/dist/Plack-Middleware-Xslate
Jesse Luehrs <doy at cpan dot org>
This software is Copyright (c) 2012 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License
To install Plack::Middleware::Xslate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::Xslate
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::Xslate
For more information on module installation, please visit the detailed CPAN module installation guide.