Template Toolkit ModulesTemplate::Stash::XS |
[ Tutorial ][ Manual ][ Modules ][ Library ][ Tools ][ FAQ ][ Release ] <-[ Template::Stash::Context ][ Template::Test ]-> |
SYNOPSIS |
[ Index ][ Modules ][ Top ] |
use Template; use Template::Stash::XS; my $stash = Template::Stash::XS->new(\%vars); my $tt2 = Template->new({ STASH => $stash }); |
DESCRIPTION |
[ Index ][ Modules ][ Top ] |
The Template:Stash::XS module is an implementation of the Template::Stash written in C. The "XS" in the name refers to Perl's XS extension system for interfacing Perl to C code. It works just like the regular Perl implementation of Template::Stash but runs about twice as fast.
The easiest way to use the XS stash is to configure the Template
Toolkit to use it by default. You can do this at installation time
(when you run Do you want to build the XS Stash module? y Do you want to use the XS Stash by default? y
See the
If you don't elect to use the XS stash by default then you should use
the use Template; use Template::Stash::XS; my $stash = Template::Stash::XS->new(\%vars); my $tt2 = Template->new({ STASH => $stash });
Alternately, you can set the use Template; use Template::Config; $Template::Config::STASH = 'Template::Stash::XS'; my $tt2 = Template->new(); The XS stash will then be automatically used.
If you want to use the XS stash by default and don't want to
re-install the Template Toolkit, then you can manually modify the
$STASH = 'Template::Stash::XS'; |
BUGS |
[ Index ][ Modules ][ Top ] |
Please report bugs to the Template Toolkit mailing list templates@template-toolkit.org |
AUTHORS |
[ Index ][ Modules ][ Top ] |
Andy Wardley <abw@tt2.org> Doug Steinwand <dsteinwand@citysearch.com> |
VERSION |
[ Index ][ Modules ][ Top ] |
Template Toolkit version 2.19, released on 27 April 2007. |
COPYRIGHT |
[ Index ][ Modules ][ Top ] |
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
SEE ALSO |
[ Index ][ Modules ][ Top ] |