Mojolicious::Plugin::HTMLTemplateProRenderer - Mojolicious Plugin
# Mojolicious $self->plugin('HTMLTemplateProRenderer'); # Mojolicious::Lite plugin 'HTMLTemplateProRenderer'; # Render HTML::Template::Pro handler and post 'utf8 => 1' option for next HTML::Template::Pro->new call get '/' => sub{ my $self = shift; $self->render('bender', handler => 'tmpl', tmpl_opts => {utf8 => 1}); } # Set default options for all HTML::Template::Pro->new calls plugin 'HTMLTemplateProRenderer', tmpl_opts => {blind_cache => 1, open_mode => '<:encoding(UTF-16)'};
Mojolicious::Plugin::HTMLTemplateProRenderer is a Mojolicious plugin to use HTML::Template::Pro module in your Mojo projects.
HTML::Template::Pro is a fast lightweight C/Perl+XS reimplementation of HTML::Template (as of 2.9) and HTML::Template::Expr (as of 0.0.7). It is not intended to be a complete replacement, but to be a fast implementation of HTML::Template if you don't need querying, the extended facility of HTML::Template.
Designed for heavy upload, resource limitations, abcence of mod_perl.
Mojolicious::Plugin::HTMLTemplateProRenderer inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register;
Register plugin in Mojolicious application.
These are options for Mojolicious::Plugin::HTMLTemplateProRenderer
use_home_template
$self->render('template', handler => 'tmpl',use_home_template => 1);
Templates are found starting from home base app path other than home_app/templates path.
Mojolicious, Mojolicious::Guides, http://mojolicio.us.
Copyright 2014 Emiliano Bruni, all rights reserved.
Initially based on Mojolicious::Plugin::HTMLTemplateRenderer code which is copyrighted by Bob Faist.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mojolicious::Plugin::HTMLTemplateProRenderer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::HTMLTemplateProRenderer
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::HTMLTemplateProRenderer
For more information on module installation, please visit the detailed CPAN module installation guide.