Marc Chantreux wrote:
SNIP
> I have 2 questions about it:
> i use Template::Stash, so i guess that XS isn't used anymore in my
> script so i lost performance. is it right?
No, the use of the XS stash is determined by:
$Template::Config::STASH = 'Template::Stash::XS';
OR:
my $stash = Template::
Well, coincidentally I found myself needing to solve the same problem as the
OP. I replaced some template inputs that had been plain numbers with
objects (implemented in the standard fashion as a reference to a hash) that
perform some basic caching, and that reduce to numbers via "use overload".
I
Is there a filter that removes the newline character that is created
by the template comments. For example, if you used the following two
files
textbox.tt
[%PROCESS text.tt %]
text.tt
[% ## Some type of file header ###%]
[% ## Some type of file header ###%]
[% ## Some type of file header #
Use as follows:
[%- ## Some type of file header ### -%]
See "Chomping Whitespace" in documentation:
http://www.template-toolkit.org/docs/manual/Syntax.html#section_Chomping_Whitespace
By the way, this applies not only to comments.
--
Sincerely yours,
Oleg Kostyuk (CUB-UANIC)
__
At 6:37 PM on 30 Jul 2008, John Bida wrote:
> Is there a filter that removes the newline character that is created
> by the template comments. For example, if you used the following two
> files
>
>
> textbox.tt
>
> [%PROCESS text.tt %]
>
>
> text.tt
> [% ## Some type of file header ###%]
Using
[%- #Comment %]
Removed the newline character. Thanks for all the responses.
~Jp
On Jul 30, 2008, at 8:09 PM, C. Chad Wallace wrote:
>
> At 6:37 PM on 30 Jul 2008, John Bida wrote:
>
>> Is there a filter that removes the newline character that is created
>> by the template comments. For