Re: [Templates] register vmethods?

2008-07-30 Thread Josh Rosenbaum
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::

Re: [Templates] register vmethods?

2008-07-30 Thread Sean McAfee
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

[Templates] Comments create newline characters

2008-07-30 Thread John Bida
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 #

Re: [Templates] Comments create newline characters

2008-07-30 Thread Oleg Kostyuk
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) __

Re: [Templates] Comments create newline characters

2008-07-30 Thread C. Chad Wallace
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 ###%]

Re: [Templates] Comments create newline characters

2008-07-30 Thread John Bida
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