The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dancer2::Core::Role::Template - Role for template engines

VERSION

version 0.05

DESCRIPTION

This role provides methods and attributes needed for working with template.

All Dancer's templates engine should consume this role, and they need to implement a render method. This method will receive three arguments:

$self
$template
$tokens

METHODS

name

The name of the template engine (e.g.: Simple).

charset

The charset. The default value is UTF-8.

default_tmpl_ext

The default file extension. If not provided, tt is used.

views

Path to the directory containing the views.

layout

Path to the directory containing the layouts.

engine

Contains the engine.

view_pathname($view)

Returns the full path to the requested view.

layout_pathname($layout)

Returns the full path to the requested layout.

render_layout($layout, $tokens, \$content)

Render the layout with the applied tokens

apply_renderer($view, $tokens)

apply_layout

process($view, $tokens, $options)

AUTHOR

Dancer Core Developers

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Alexis Sukrieh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.