1Template::Stash::XS(3)User Contributed Perl DocumentationTemplate::Stash::XS(3)
2
3
4

NAME

6       Template::Stash::XS - High-speed variable stash written in C
7

SYNOPSIS

9           use Template;
10           use Template::Stash::XS;
11
12           my $stash = Template::Stash::XS->new(\%vars);
13           my $tt2   = Template->new({ STASH => $stash });
14

DESCRIPTION

16       The Template:Stash::XS module is an implementation of the Tem‐
17       plate::Stash written in C.  The "XS" in the name refers to Perl's XS
18       extension system for interfacing Perl to C code.  It works just like
19       the regular Perl implementation of Template::Stash but runs about twice
20       as fast.
21
22       The easiest way to use the XS stash is to configure the Template Tool‐
23       kit to use it by default.  You can do this at installation time (when
24       you run "perl Makefile.PL") by answering 'y' to the questions:
25
26           Do you want to build the XS Stash module?      y
27           Do you want to use the XS Stash by default?    y
28
29       See the INSTALL file distributed with the Template Toolkit for further
30       details on installation.
31
32       If you don't elect to use the XS stash by default then you should use
33       the "STASH" configuration item when you create a new Template object.
34       This should reference an XS stash object that you have created manu‐
35       ally.
36
37           use Template;
38           use Template::Stash::XS;
39
40           my $stash = Template::Stash::XS->new(\%vars);
41           my $tt2   = Template->new({ STASH => $stash });
42
43       Alternately, you can set the $Template::Config::STASH package variable
44       like so:
45
46           use Template;
47           use Template::Config;
48
49           $Template::Config::STASH = 'Template::Stash::XS';
50
51           my $tt2 = Template->new();
52
53       The XS stash will then be automatically used.
54
55       If you want to use the XS stash by default and don't want to re-install
56       the Template Toolkit, then you can manually modify the "Template/Con‐
57       fig.pm" module near line 42 to read:
58
59           $STASH = 'Template::Stash::XS';
60

BUGS

62       Please report bugs to the Template Toolkit mailing list templates@tem‐
63       plate-toolkit.org
64

AUTHORS

66       Andy Wardley <abw@tt2.org>
67
68       Doug Steinwand <dsteinwand@citysearch.com>
69

VERSION

71       Template Toolkit version 2.18, released on 09 February 2007.
72
74         Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.
75
76       This module is free software; you can redistribute it and/or modify it
77       under the same terms as Perl itself.
78

SEE ALSO

80       Template::Stash
81
82
83
84perl v5.8.8                       2007-02-09            Template::Stash::XS(3)
Impressum