Kelp::Module::Template::Toolkit - Template::Toolkit processing for Kelp applications
First ...
# conf/config.pl { modules => ['Template::Toolkit'], modules_init => { 'Template::Toolkit' => { ... } } };
Then ...
# lib/MyApp.pm sub some_route { my $self = shift; $self->template('some_template', { bar => 'foo' }); }
This module provides an interface for using Template inside a Kelp web application.
template($filename, \%vars)
Renders a file using the currently loaded template engine.
Template is sometimes unable to detect the correct encoding, so to ensure proper rendering, you may want to add ENCODING to its configuration:
ENCODING
# conf/config.pl { modules => ['Template::Toolkit'], modules_init => { 'Template::Toolkit' => { ENCODING => 'utf8' } } };
To install Kelp::Module::Template::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kelp::Module::Template::Toolkit
CPAN shell
perl -MCPAN -e shell install Kelp::Module::Template::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.