GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DANCER2::TEMPLATE::TINY (3)

.ds Aq ’

NAME

Dancer2::Template::Tiny - Template::Tiny engine for Dancer2

CONTENTS

VERSION

version 0.166001

SYNOPSIS

This template engine allows you to use Template::Tiny in Dancer2.

Template::Tiny is an implementation of a subset of Template::Toolkit (the major parts) which takes much less memory and is faster. If you’re only using the main functions of Template::Toolkit, you could use Template::Tiny. You can also seamlessly move back to Template::Toolkit whenever you want.

However, Dancer2 uses a modified version of Template::Tiny, which is Dancer2::Template::Implementation::ForkedTiny. It adds 2 features :
o opening and closing tag are now configurable
o CodeRefs are evaluated and their results is inserted in the result.
You can read more on Dancer2::Template::Implementation::ForkedTiny.

To use this engine, all you need to configure in your Dancer2’s config.yaml:



    template: "tiny"



Of course, you can also set this <B>whileB> working using set:



    # code code code
    set template => tiny;



Since Dancer2 has internal support for a wrapper-like option with the layout configuration option, you can have a Template::Toolkit-like WRAPPER even though Template::Tiny doesn’t really support it.

METHODS

    render($template, \%tokens)

Renders the template. The first arg is a filename for the template file or a reference to a string that contains the template. The second arg is a hashref for the tokens that you wish to pass to Template::Toolkit for rendering.

SEE ALSO

Dancer2, Dancer2::Core::Role::Template, Template::Tiny, Dancer2::Template::Implementation::ForkedTiny.

AUTHOR

Dancer Core Developers

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DANCER2::TEMPLATE::TINY (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.