<?php
define("ABS_PATH", $_SERVER['DOCUMENT_ROOT']);
include(ABS_PATH . "/head_nav.php");
include(ABS_PATH . "/middle.php");
?>
          <div class="section">
            <div class="toc-wrapper">
              <span class="toc-title">Contents:</span>
              <ul class="toc">
                  <li class=""><a href="#SYNOPSIS">SYNOPSIS</a></li>
                  <li class=""><a href="#DESCRIPTION">DESCRIPTION</a></li>
                  <li class=""><a href="#PUBLIC_METHODS">PUBLIC METHODS</a></li>
                  <li class="sub"><a href="#method_load">load($module)</a></li>
                  <li class="sub"><a href="#method_preload">preload()</a></li>
                  <li class="sub"><a href="#method_parser">parser(\%config)</a></li>
                  <li class="sub"><a href="#method_provider">provider(\%config)</a></li>
                  <li class="sub"><a href="#method_plugins">plugins(\%config)</a></li>
                  <li class="sub"><a href="#method_filters">filters(\%config)</a></li>
                  <li class="sub"><a href="#method_stash">stash(\%vars)</a></li>
                  <li class="sub"><a href="#method_context">context(\%config)</a></li>
                  <li class="sub"><a href="#method_service">service(\%config)</a></li>
                  <li class="sub"><a href="#method_iterator">iterator(\%config)</a></li>
                  <li class="sub"><a href="#method_constants">constants(\%config)</a></li>
                  <li class="sub"><a href="#method_instdir">instdir($dir)</a></li>
                  <li class=""><a href="#AUTHOR">AUTHOR</a></li>
                  <li class=""><a href="#COPYRIGHT">COPYRIGHT</a></li>
                  <li class=""><a href="#SEE_ALSO">SEE ALSO</a></li>
              </ul>
            </div>
          </div>
          
                <div class="pod">
            <div class="section">
              <div class="head">
                <h1 id="SYNOPSIS">SYNOPSIS</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <pre>use Template::Config;</pre>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="DESCRIPTION">DESCRIPTION</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      This module implements various methods for loading and instantiating
                      other modules that comprise the Template Toolkit. It provides a
                      consistent way to create toolkit components and allows custom modules to
                      be used in place of the regular ones.
                    </p>
                    <p>
                      Package variables such as <code>$STASH</code>, <code>$SERVICE</code>,
                      <code>$CONTEXT</code>, etc., contain the default module/package name for
                      each component (<a href="../../modules/Template/Stash.php">Template::Stash</a>, <a href="../../modules/Template/Service.php">Template::Service</a> and <a href="../../modules/Template/Context.php">Template::Context</a>, respectively)
                      and are used by the various factory methods (<a
                      href="#method_stash">stash()</a>, <a href="#method_service">service()</a>
                      and <a href="#method_context">context()</a>) to load the appropriate
                      module. Changing these package variables will cause subsequent calls to
                      the relevant factory method to load and instantiate an object from the
                      new class.
                    </p>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="PUBLIC_METHODS">PUBLIC METHODS</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <div class="subsection">
                  <div class="head">
                    <h2 id="method_load" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">load($module)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Load a module using Perl's <a href="#method_require">require()</a>. Any
                          occurences of '<code>::</code>' in the module name are be converted to
                          '<code>/</code>', and '<code>.pm</code>' is appended. Returns 1 on
                          success or undef on error. Use <code>$class-&gt;error()</code> to examine
                          the error string.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_preload" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">preload()</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          This method preloads all the other <code>Template::*</code> modules that
                          are likely to be used. It is called automatically by the <a href="../../modules/Template.php">Template</a> module when running under
                          mod_perl (<code>$ENV{MOD_PERL}</code> is set).
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_parser" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">parser(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new parser object of the class whose name is denoted by the
                          package variable <code>$PARSER</code> (default: <a href="../../modules/Template/Parser.php">Template::Parser</a>). Returns a
                          reference to a newly instantiated parser object or undef on error.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_provider" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">provider(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new template provider object (default: <a href="../../modules/Template/Provider.php">Template::Provider</a>). Returns an
                          object reference or undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_plugins" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">plugins(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new plugins provider object (default: <a href="../../modules/Template/Plugins.php">Template::Plugins</a>). Returns an
                          object reference or undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_filters" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">filters(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new filter provider object (default: <a href="../../modules/Template/Filters.php">Template::Filters</a>). Returns an
                          object reference or undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_stash" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">stash(\%vars)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new stash object (<a href="../../modules/Template/Stash.php">Template::Stash</a> or <a href="../../modules/Template/Stash/XS.php">Template::Stash::XS</a> depending on the default set at installation
                          time) using the contents of the optional hash array passed by parameter
                          as initial variable definitions. Returns an object reference or undef on
                          error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_context" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">context(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new template context object (default: <a href="../../modules/Template/Context.php">Template::Context</a>). Returns an
                          object reference or undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_service" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">service(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new template service object (default: <a href="../../modules/Template/Service.php">Template::Service</a>). Returns an
                          object reference or undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_iterator" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">iterator(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new template iterator object (default: <a href="../../modules/Template/Iterator.php">Template::Iterator</a>). Returns an
                          object reference or undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_constants" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">constants(\%config)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Instantiate a new namespace handler for compile time constant folding
                          (default: <a href="../../modules/Template/Namespace/Constants.php">Template::Namespace::Constants</a>). Returns an object reference or
                          undef on error, as above.
                        </p>
                  </div>
                </div>    <div class="subsection">
                  <div class="head">
                    <h2 id="method_instdir" class="method" onclick="switch_subsection(this)" title="Click title to show/hide sub-section content.">instdir($dir)</h2>
                    <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
                  </div>
                  <div class="body">
                    <p>
                          Returns the root directory of the Template Toolkit installation under
                          which optional components are installed. Any relative directory specified
                          as an argument will be appended to the returned directory.
                        </p>
                        <pre># e.g. returns '/usr/local/tt2'
my $ttroot = Template::Config-&gt;instdir()
    || die "$Template::Config::ERROR\n";

# e.g. returns '/usr/local/tt2/templates'
my $template = Template::Config-&gt;instdir('templates')
    || die "$Template::Config::ERROR\n";</pre>
                        <p>
                          Returns <code>undef</code> and sets <code>$Template::Config::ERROR</code>
                          appropriately if the optional components of the Template Toolkit have not
                          been installed.
                        </p>
                  </div>
                </div>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="AUTHOR">AUTHOR</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      Andy Wardley &lt;abw@wardley.org&gt; <a
                      href="https://wardley.org/">https://wardley.org/</a>
                    </p>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="COPYRIGHT">COPYRIGHT</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.
                    </p>
                    <p>
                      This module is free software; you can redistribute it and/or modify it
                      under the same terms as Perl itself.
                    </p>
              </div>
            </div>
            <div class="section">
              <div class="head">
                <h1 id="SEE_ALSO">SEE ALSO</h1>
                <a href="#body" class="top" title="Back up to the top of the page" >Top</a>
              </div>
              <div class="body">
                <p>
                      <a href="../../modules/Template.php">Template</a>
                    </p>
              </div>
            </div>
            
            </div>
<?php include(ABS_PATH . "/footer.php"); ?>
