NAME
HTML::Template::Ex::Filter - tmpl_tag filter for HTML::Template::Ex.
SYNOPSIS
use HTML::Template::Ex;
use HTML::Template::Ex::Filter;
my $tmpl= HTML::Template::Ex->new(
...
filter=> HTML::Template::Ex::Filter->set,
);
[%... include_template.tmpl %]
[% ex %]
my($self, $param)= @_;
...
..... ban, bo, bon.
"";
[% end_ex %]
[% =param_name %]
[% loop loop_param_name %]
...
[% end_loop %]
DESCRIPTION
This module offers the filter to make the format of HTML::Template easy a little.
TAGS
[% ex %] ... [% end_ex %]
It corresponds to '<TMPL_EX> ... </TMPL_EX>'.
To specify the NAME attribute, as follows is done.
[% ex param_name %] ...
In addition, delimit by the ESCAPE attribute and to the following
[% ex html:param_name %]
NAME attribute a unspecified ESCAPE attribute must make the head and to the following
[% ex html: %]
[% set PARAM_NAME="PARAM_VALUE" %]
It corresponds to '<TMPL_SET NAME="PARAM_NAME" VALUE="PARAM_VALUE">'.
[% =VAR_NAME %]
It corresponds to '<TMPL_VAR NAME="VAR_NAME">'.
The ESCAPE attribute does as follows.
[% =html:VAR_NAME %]
[% if VAR_NAME %] ... [% else %] ... [% end_if %]
It corresponds to '<TMPL_IF NAME="VAR_NAME"> ... <TMPL_ELSE> ... </TMPL_IF>'.
[% unless VAR_NAME %] ... [% else %] ... [% end_unless %]
It corresponds to '<TMPL_UNLESS NAME="VAR_NAME"> ... <TMPL_ELSE> ... </TMPL_UNLESS>'.
[% loop ARRAY_NAME %] ... [% end_loop %]
It corresponds to '<TMPL_LOOP NAME="ARRAY_NAME"> ... </TMPL_LOOP>'.
[%... INCLUDE_TEMPLATE %] or [% include INCLUDE_TEMPLATE %]
It corresponds to '<TMPL_INCLUDE NAME="...">'.
[% ! COMMENT_STRING %] or [% comment COMMENT_STRING %]
It is a comment. It is not reflected in the template.
SEE ALSO
AUTHOR
Masatoshi Mizuno <mizuno@bomcity.com>
COPYRIGHT
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
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.6 or, at your option, any later version of Perl 5 you may have available.