Text::Xslate::Bridge::TT2 - Template-Toolkit virtual methods and filters for Xslate
This document describes Text::Xslate::Bridge::TT2 version 1.0002.
use Text::Xslate; my $xslate = Text::Xslate->new( module => ['Text::Xslate::Bridge::TT2'], ); print $xslate->render_string('<: "foo".length() :>'); # => 3
Template-Toolkit sucks, but has a few useful features. Virtual methods and filters are such a feature. This module provides Xslate with Template-Toolkit virtual methods and filters.
All the dynamic filters require parens (i.e. to "call" them first), even if you want to omit their arguments.
[% FILTER repeat # doesn't work! %] [% FILTER repeat() # works. %]
Filters that require Template-Toolkit context object are not supported, which include eval, evaltt, perl, evalperl and redirect.
eval
evaltt
perl
evalperl
redirect
Perl 5.8.1 or later.
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Text::Xslate
Template
Template::Manual::VMethods
Template::Manual::Filters
Goro Fuji (gfx) <gfuji(at)cpan.org>
Copyright (c) 2010, Goro Fuji (gfx). All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic for details.
To install Text::Xslate::Bridge::TT2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Xslate::Bridge::TT2
CPAN shell
perl -MCPAN -e shell install Text::Xslate::Bridge::TT2
For more information on module installation, please visit the detailed CPAN module installation guide.