Jesse Luehrs > Plack-Middleware-Xslate-0.01 > Plack::Middleware::Xslate

Download:
Plack-Middleware-Xslate-0.01.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.01   Source   Latest Release: Plack-Middleware-Xslate-0.03

NAME ^

Plack::Middleware::Xslate - serve static templates with Plack

VERSION ^

version 0.01

SYNOPSIS ^

  use Plack::Builder;

  builder {
      enable "Xslate",
          path => qr{^/}, root => 'root/templates/', pass_through => 1;
      $app;
  };

DESCRIPTION ^

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:

xslate_args

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.

xslate_vars

A hashref of data to use when rendering the template. This will be passed to Text::Xslate->render every time a template is rendered.

BUGS ^

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.

SEE ALSO ^

Plack::Request - Much of this module's API and implementation were taken from Plack::Request.

SUPPORT ^

You can find this documentation for this module with the perldoc command.

    perldoc Plack::Middleware::Xslate

You can also look for information at:

AUTHOR ^

Jesse Luehrs <doy at cpan dot org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2012 by Jesse Luehrs.

This is free software, licensed under:

  The MIT (X11) License
syntax highlighting: