31 Mar 2011 19:31:25 UTC
- Distribution: Dancer-Template-Tenjin
- Module version: 0.5
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (943 / 51 / 4)
- KwaliteeBus factor: 0
- 87.50% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity24 month
- Download (14.31KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionIDOPEREL עידו פרלמוטר (Ido Perlmuter)
- SEE ALSO
- LICENSE AND COPYRIGHT
Dancer::Template::Tenjin - Tenjin wrapper for Dancer
# in your config.yml template: "tenjin" # note: templates must use the '.tt' extension # you might also want to add (if your templates are UTF-8, which is the # default encoding used by Tenjin): charset: "UTF-8"
This class is an interface between Dancer's template engine abstraction layer and the Tenjin module.
Tenjin is a fast and feature-full templating engine that can be used by Dancer for production purposes. In comparison to Template::Toolkit, it is much more lightweight, has almost no dependencies, and supports embedded Perl code instead of defining its own language.
In order to use this engine, you need to set your webapp's template engine in your app's configuration file (config.yml) like so:
You can also directly set it in your app code with the set keyword.
Now you can create Tenjin templates normally, but note that due to a Dancer restriction your template files must end in the '.tt' extension as Dancer automatically adds this extension to the template names you declare in your apps.
Initializes a template engine by generating a new instance of Tenjin.
Receives a template name and a hash-ref of key-value pairs to pass to the template, and returns the template rendered by Tenjin.
<ido at ido50 dot net>
<xsawyerx at cpan.org>
Submitted helpful changes for version 0.3.
<franck at lumberjaph dot net>
Submitted a simple test for version 0.4.
Find a way to allow using templates from other source, such as a database, just like in Catalyst::View::Tenjin.
Allow passing arguments to Tenjin, such as USE_STRICT.
Please report any bugs or feature requests to
bug-dancer-template-tenjin at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer-Template-Tenjin. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
Copyright 2010-2011 Ido Perlmuter.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install Dancer::Template::Tenjin, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Dancer::Template::Tenjin
For more information on module installation, please visit the detailed CPAN module installation guide.