Template::HTML - Automatic HTML encoding of tags for Template Toolkit
use Template::HTML; my $config = { # See Template.pm }; my $template = Template::HTML->new($config); my $vars = { var1 => $value, var2 => \%hash, var3 => \@list, var4 => \&code, var5 => $object, }; # specify input filename, or file handle, text reference, etc. my $input = 'myfile.html'; # process input template, substituting variables $template->process($input, $vars) || die $template->error();
This is a subclass of Template (the Template Toolkit frontend) provides completely automatic application of an HTML filter on all templated variables.
An extra special filter called "none" is provided to "opt-out" on a per variable basis.
http://git.dollyfish.net.nz/?p=Template-HTML
An implementation of the Template::new() method that forces the Context and Stash to be Template::HTML::* rather than Template::*
Martyn Smith, <msmith@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
Copyright (c) 2008 - 2010 the Template::HTML "AUTHOR" as listed above.
To install Template::HTML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::HTML
CPAN shell
perl -MCPAN -e shell install Template::HTML
For more information on module installation, please visit the detailed CPAN module installation guide.