On Sun, Jun 01, 2003 at 11:53:39AM +0200, Franco Bagnoli wrote:
> Thanks a lot, it works very well. I do not like to alter the standard tt2
> distribution, for future compatibility. I hope it will be inserted in the
> next distribution, too.
Yep, it will.
> The problem: if TEXT contains an invalid tt2 directive the whole page is
> affected. I tried to surround the text with TRY/CATCH but it does not work
> for syntax errors. Have I missed something?
Works for me.
[% TRY;
INCLUDE badfile;
CATCH;
"Caught error: $error\n";
END
%]
Caught error: file error - parse error - badfile line 1: unexpected end of directive
[% FOREACH %]
> A final point: if one wants to change the start-end tags in the config,
> and wants brackets, he has to write for instance
[...]
> which is not documented, at least as far I know.
Apart from in the second paragraph of Template::Manual::Config... :-)
Any Perl regex characters can be used and therefore should be escaped
(or use the Perl 'quotemeta' function) if they are intended to represent
literal characters.
my $template = Template->new({
START_TAG => quotemeta('<+'),
END_TAG => quotemeta('+>'),
});
A
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates