If you don't want TT to add whitespace to your output, you can also use the PRE_CHOMP or POST_CHOMP directives when you make your Template object.
My Template (2.802.14) doesn't seem to mind multiple [% END %] directives on the same line. Perhaps something else was going on in your code?
#!/usr/bin/perl use Template; my $tt = Template->new; my $template = <<"HERE"; <a[% IF url %] href="[% url %]"[% END %][% IF active %] class="active" +[% END %]> HERE $tt->process( \$template, { url => 'http://www.example.com', active => 1 } ); $tt->process( \$template, { url => 'http://www.example.com', active => 0 } );
As for ttree, you can specify the config file with the -f switch. Are you playing with an older TT, by any chance?
In reply to Re: Thoughts on converting from HTML::Template to Template Toolkit
by brian_d_foy
in thread Thoughts on converting from HTML::Template to Template Toolkit
by Tanktalus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |