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::Stash::XS->new(\%vars);
my $tt2 = Template->new({ STASH => $stash });
More details here:
http://template-toolkit.org/docs/modules/Template/Stash/XS.html
It doesn't matter if you "use Template::Stash". So as long as the XS stash is
your default, you aren't losing any speed. (The default is set in
Template/Config.pm when you install.)
> is it a way to handle a vmethod for an object without using USE or
> declare anything (everything is done in the perl code)?
> I just want something as simple as
>
> [% notice.field('99'); %]
I'd just add a method to the object, but if you had to do a vmethod then Sean's
method seems like the logical way to do it.
-- Josh
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates