~ubuntu-branches/ubuntu/quantal/libtemplate-perl/quantal

« back to all changes in this revision

Viewing changes to html/old/modules/Template/Stash/XS.html

  • Committer: Package Import Robot
  • Author(s): Benjamin Mako Hill
  • Date: 2012-04-08 19:06:29 UTC
  • mfrom: (0.7.1) (0.5.2) (5.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120408190629-wbcbs2ea39mex6lt
Tags: 2.24-1
* New upstream release (Closes: #664561)
* Bump Standards-Version to 3.9.3
* Changed to the short description to mention the term "Template
  Toolkit". (LP: #688836)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
 
4
<html>
 
5
  <head>
 
6
    <title>Template::Stash::XS</title>
 
7
    <link rel="stylesheet" type="text/css" href="../../../css/blue.css" title="Clear Blue">
 
8
    <link rel="alternate stylesheet" type="text/css" href="../../../css/orange.css" title="Clear Orange">
 
9
    <link rel="alternate stylesheet" type="text/css" href="../../../css/green.css" title="Clear Green">
 
10
    <link rel="alternate stylesheet" type="text/css" href="../../../css/purple.css" title="Clear Purple">
 
11
    <link rel="alternate stylesheet" type="text/css" href="../../../css/grey.css" title="Clear Grey">
 
12
    <!--[if IE 6]>
 
13
    <link rel="stylesheet" type="text/css" href="../../../css/ie6.css" />
 
14
    <![endif]-->
 
15
    <link rel="stylesheet" type="text/css" href="/css/print.css" media="print">
 
16
    <script type="text/javascript" src="../../../js/tt2.js"></script>
 
17
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 
18
    <meta name="author" content="Andy Wardley">
 
19
  </head>
 
20
  <body id="body"> 
 
21
    <div id="layout">
 
22
        <div id="header">
 
23
          <a href="../../../index.html" id="logo" alt="" title="Click for the Home Page"><span class="alt">TT2 Home Page</span></a>
 
24
          <ul id="trail">
 
25
            <li><a href="../../../modules/index.html">Modules</a></li>
 
26
            <li><a href="../../../modules/Template/index.html">Template::*</a></li>
 
27
            <li><a href="../../../modules/Template/Stash/index.html">Stash::*</a></li>
 
28
            <li class="last"><a href="../../../modules/Template/Stash/XS.html">XS.pm</a></li>
 
29
          </ul>
 
30
          <div class="controls">
 
31
            <a href="#" class="menu show" onclick="widescreen_off(); return false" title="Show Menu">
 
32
              <span class="about">Click to view the menu.  It's very nice.</span>
 
33
            </a>
 
34
            <a href="#" class="menu hide" onclick="widescreen_on();  return false" title="Hide Menu">
 
35
              <span class="about">Click to hide the menu and go all widescreen!</span>
 
36
            </a>
 
37
          
 
38
          <div class="pager">
 
39
            <a href="../../../modules/Template/Stash/Context.html" title="Template::Stash::Context" class="go back">Back<span class="about"><h4>Template::Stash::Context</h4>Experimetal stash allowing list/scalar context definition</span></a>
 
40
            <a href="../../../modules/Template/Stash/index.html" title="Template::Stash::* Modules" class="go up">Up<span class="about"><h4>Template::Stash::* Modules</h4></span></a>
 
41
            <span class="go next">Next<span class="about">My name is <i>Meles Meles</i>, but you can call me "Badger".</span></span>
 
42
          </div>
 
43
          </div>
 
44
          <h1 class="headline">Template::Stash::XS</h1>
 
45
          <h2 class="subhead">High-speed variable stash written in C</h1>
 
46
        
 
47
        </div>
 
48
        <div id="page">
 
49
          <div id="sidebar">
 
50
            <a href="../../../index.html" id="logo"></a>
 
51
            <div id="menu">
 
52
              <ul class="menu">
 
53
                <li class="l0 first"><a href="../../../manual/index.html">Manual</a></li>
 
54
                <li class="l0"><a href="../../../modules/index.html" class="warm">Modules</a></li>
 
55
                <li class="l1"><a href="../../../modules/Template.html">Template.pm</a></li>
 
56
                <li class="l1"><a href="../../../modules/Template/index.html" class="warm">Template::*</a></li>
 
57
                <li class="l2"><a href="../../../modules/Template/Base.html">Base.pm</a></li>
 
58
                <li class="l2"><a href="../../../modules/Template/Config.html">Config.pm</a></li>
 
59
                <li class="l2"><a href="../../../modules/Template/Constants.html">Constants.pm</a></li>
 
60
                <li class="l2"><a href="../../../modules/Template/Context.html">Context.pm</a></li>
 
61
                <li class="l2"><a href="../../../modules/Template/Directive.html">Directive.pm</a></li>
 
62
                <li class="l2"><a href="../../../modules/Template/Document.html">Document.pm</a></li>
 
63
                <li class="l2"><a href="../../../modules/Template/Exception.html">Exception.pm</a></li>
 
64
                <li class="l2"><a href="../../../modules/Template/Filters.html">Filters.pm</a></li>
 
65
                <li class="l2"><a href="../../../modules/Template/Grammar.html">Grammar.pm</a></li>
 
66
                <li class="l2"><a href="../../../modules/Template/Iterator.html">Iterator.pm</a></li>
 
67
                <li class="l2"><a href="../../../modules/Template/Namespace/index.html">Namespace::*</a></li>
 
68
                <li class="l2"><a href="../../../modules/Template/Parser.html">Parser.pm</a></li>
 
69
                <li class="l2"><a href="../../../modules/Template/Plugin.html">Plugin.pm</a></li>
 
70
                <li class="l2"><a href="../../../modules/Template/Plugin/index.html">Plugin::*</a></li>
 
71
                <li class="l2"><a href="../../../modules/Template/Plugins.html">Plugins.pm</a></li>
 
72
                <li class="l2"><a href="../../../modules/Template/Provider.html">Provider.pm</a></li>
 
73
                <li class="l2"><a href="../../../modules/Template/Service.html">Service.pm</a></li>
 
74
                <li class="l2"><a href="../../../modules/Template/Stash.html">Stash.pm</a></li>
 
75
                <li class="l2"><a href="../../../modules/Template/Stash/index.html" class="warm">Stash::*</a></li>
 
76
                <li class="l3"><a href="../../../modules/Template/Stash/Context.html">Context.pm</a></li>
 
77
                <li class="l3"><a href="../../../modules/Template/Stash/XS.html" class="warm">XS.pm</a></li>
 
78
                <li class="l2"><a href="../../../modules/Template/Test.html">Test.pm</a></li>
 
79
                <li class="l2"><a href="../../../modules/Template/VMethods.html">VMethods.pm</a></li>
 
80
                <li class="l2"><a href="../../../modules/Template/View.html">View.pm</a></li>
 
81
                <li class="l0"><a href="../../../tools/index.html">Tools</a></li>
 
82
                <li class="l0 last"><a href="../../../tutorial/index.html">Tutorial</a></li>
 
83
              </ul>
 
84
              <div class="foot"></div>
 
85
            </div>
 
86
          </div>
 
87
          <div id="content">
 
88
          <div class="section">
 
89
            <div class="head">
 
90
              <h1 id="contents" onclick="switch_section(this)" title="Click title to show/hide section content.">Contents</h1>
 
91
              <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
92
            </div>
 
93
            <div class="body">
 
94
              <ul class="toc">
 
95
                  <li class=""><a href="#SYNOPSIS">SYNOPSIS</a></li>
 
96
                  <li class=""><a href="#DESCRIPTION">DESCRIPTION</a></li>
 
97
                  <li class=""><a href="#BUGS">BUGS</a></li>
 
98
                  <li class=""><a href="#AUTHORS">AUTHORS</a></li>
 
99
                  <li class=""><a href="#VERSION">VERSION</a></li>
 
100
                  <li class=""><a href="#COPYRIGHT">COPYRIGHT</a></li>
 
101
                  <li class=""><a href="#SEE_ALSO">SEE ALSO</a></li>
 
102
              
 
103
              </ul>
 
104
            </div>
 
105
          </div>
 
106
          
 
107
                <div class="pod">
 
108
            <div class="section">
 
109
              <div class="head">
 
110
                <h1 id="SYNOPSIS" onclick="switch_section(this)" title="Click title to show/hide section content.">SYNOPSIS</h1>
 
111
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
112
              </div>
 
113
              <div class="body">
 
114
                <pre>use Template;
 
115
use Template::Stash::XS;</pre>
 
116
                    <pre>my $stash = Template::Stash::XS-&gt;new(\%vars);
 
117
my $tt2   = Template-&gt;new({ STASH =&gt; $stash });</pre>
 
118
              </div>
 
119
            </div>
 
120
            <div class="section">
 
121
              <div class="head">
 
122
                <h1 id="DESCRIPTION" onclick="switch_section(this)" title="Click title to show/hide section content.">DESCRIPTION</h1>
 
123
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
124
              </div>
 
125
              <div class="body">
 
126
                <p>
 
127
                      The Template:Stash::XS module is an implementation of the Template::Stash
 
128
                      written in C. The "XS" in the name refers to Perl's XS extension system
 
129
                      for interfacing Perl to C code. It works just like the regular Perl
 
130
                      implementation of Template::Stash but runs about twice as fast.
 
131
                    </p>
 
132
                    <p>
 
133
                      The easiest way to use the XS stash is to configure the Template Toolkit
 
134
                      to use it by default. You can do this at installation time (when you run
 
135
                      <code>perl Makefile.PL</code>) by answering 'y' to the questions:
 
136
                    </p>
 
137
                    <pre>Do you want to build the XS Stash module?      y
 
138
Do you want to use the XS Stash by default?    y</pre>
 
139
                    <p>
 
140
                      See the <i>INSTALL</i> file distributed with the Template Toolkit for
 
141
                      further details on installation.
 
142
                    </p>
 
143
                    <p>
 
144
                      If you don't elect to use the XS stash by default then you should use the
 
145
                      <code>STASH</code> configuration item when you create a new Template
 
146
                      object. This should reference an XS stash object that you have created
 
147
                      manually.
 
148
                    </p>
 
149
                    <pre>use Template;
 
150
use Template::Stash::XS;</pre>
 
151
                    <pre>my $stash = Template::Stash::XS-&gt;new(\%vars);
 
152
my $tt2   = Template-&gt;new({ STASH =&gt; $stash });</pre>
 
153
                    <p>
 
154
                      Alternately, you can set the <code>$Template::Config::STASH</code>
 
155
                      package variable like so:
 
156
                    </p>
 
157
                    <pre>use Template;
 
158
use Template::Config;</pre>
 
159
                    <pre>$Template::Config::STASH = 'Template::Stash::XS';</pre>
 
160
                    <pre>my $tt2 = Template-&gt;new();</pre>
 
161
                    <p>
 
162
                      The XS stash will then be automatically used.
 
163
                    </p>
 
164
                    <p>
 
165
                      If you want to use the XS stash by default and don't want to re-install
 
166
                      the Template Toolkit, then you can manually modify the
 
167
                      <code>Template/Config.pm</code> module near line 42 to read:
 
168
                    </p>
 
169
                    <pre>$STASH = 'Template::Stash::XS';</pre>
 
170
              </div>
 
171
            </div>
 
172
            <div class="section">
 
173
              <div class="head">
 
174
                <h1 id="BUGS" onclick="switch_section(this)" title="Click title to show/hide section content.">BUGS</h1>
 
175
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
176
              </div>
 
177
              <div class="body">
 
178
                <p>
 
179
                      Please report bugs to the Template Toolkit mailing list
 
180
                      templates@template-toolkit.org
 
181
                    </p>
 
182
              </div>
 
183
            </div>
 
184
            <div class="section">
 
185
              <div class="head">
 
186
                <h1 id="AUTHORS" onclick="switch_section(this)" title="Click title to show/hide section content.">AUTHORS</h1>
 
187
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
188
              </div>
 
189
              <div class="body">
 
190
                <p>
 
191
                      Andy Wardley &lt;abw@tt2.org&gt;
 
192
                    </p>
 
193
                    <p>
 
194
                      Doug Steinwand &lt;dsteinwand@citysearch.com&gt;
 
195
                    </p>
 
196
              </div>
 
197
            </div>
 
198
            <div class="section">
 
199
              <div class="head">
 
200
                <h1 id="VERSION" onclick="switch_section(this)" title="Click title to show/hide section content.">VERSION</h1>
 
201
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
202
              </div>
 
203
              <div class="body">
 
204
                <p>
 
205
                      Template Toolkit version 2.19, released on 27 April 2007.
 
206
                    </p>
 
207
              </div>
 
208
            </div>
 
209
            <div class="section">
 
210
              <div class="head">
 
211
                <h1 id="COPYRIGHT" onclick="switch_section(this)" title="Click title to show/hide section content.">COPYRIGHT</h1>
 
212
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
213
              </div>
 
214
              <div class="body">
 
215
                <pre>Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.</pre>
 
216
                    <p>
 
217
                      This module is free software; you can redistribute it and/or modify it
 
218
                      under the same terms as Perl itself.
 
219
                    </p>
 
220
              </div>
 
221
            </div>
 
222
            <div class="section">
 
223
              <div class="head">
 
224
                <h1 id="SEE_ALSO" onclick="switch_section(this)" title="Click title to show/hide section content.">SEE ALSO</h1>
 
225
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
 
226
              </div>
 
227
              <div class="body">
 
228
                <p>
 
229
                      <a href="../../../modules/Template/Stash.html">Template::Stash</a>
 
230
                    </p>
 
231
              </div>
 
232
            </div>
 
233
            
 
234
            </div></div>
 
235
          <br class="clear" />
 
236
          <div class="pageinfo">
 
237
            /modules/Template/Stash/XS.html last modified 10:55:09 31-May-2007
 
238
          </div>
 
239
        </div>
 
240
        
 
241
        <div id="footer">
 
242
          <a href="http://opensource.org/" class="osi"></a>
 
243
          <div class="controls">
 
244
          <div class="pager">
 
245
            <a href="../../../modules/Template/Stash/Context.html" title="Template::Stash::Context" class="go back">Back<span class="about"><h4>Template::Stash::Context</h4></span></a>
 
246
            <a href="../../../modules/Template/Stash/index.html" title="Template::Stash::* Modules" class="go up">Up<span class="about"><h4>Template::Stash::* Modules</h4></span></a>
 
247
            <span class="go next">Next<span class="about"></span></span>
 
248
          </div>
 
249
          </div>
 
250
          <div class="copyright">
 
251
            Copyright &copy; 1996-2007 <a href="http://wardley.org/">Andy Wardley</a>.  All Rights Reserved.
 
252
          </div>
 
253
          <div class="licence">
 
254
            The <a href="http://template-toolkit.org/">Template Toolkit</a> is <a href="http://opensource.org/">Open Source</a> software.
 
255
            You can redistribute and/or modify it under the terms of the <a href="http://www.opensource.org/licenses/gpl-license.php">GNU Public Licence</a>
 
256
            or the <a href="http://www.opensource.org/licenses/artistic-license.php">Perl Artistic Licence</a>.
 
257
          </div>
 
258
        </div>
 
259
        <div id="palette">
 
260
          <ul>
 
261
            <li class="first"><a href="#" class="blue" onclick="set_style('Clear Blue')"></a></li>
 
262
            <li><a href="#" class="orange" onclick="set_style('Clear Orange')"></a></li>
 
263
            <li><a href="#" class="green" onclick="set_style('Clear Green')"></a></li>
 
264
            <li><a href="#" class="purple" onclick="set_style('Clear Purple')"></a></li>
 
265
            <li><a href="#" class="grey" onclick="set_style('Clear Grey')"></a></li>
 
266
          </ul>
 
267
        </div>
 
268
    </div>  </body>
 
269
</html>