<?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="#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><span class="tt">[% USE assert %]</span>

# throws error if any undefined values are returned
<span class="tt">[% object.assert.method %]</span>
<span class="tt">[% hash.assert.key %]</span>
<span class="tt">[% list.assert.item %]</span></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 plugin defines the <code>assert</code> virtual method that can be
                      used to automatically throw errors when undefined values are used.
                    </p>
                    <p>
                      For example, consider this dotop:
                    </p>
                    <pre><span class="tt">[% user.name %]</span></pre>
                    <p>
                      If <code>user.name</code> is an undefined value then TT will silently
                      ignore the fact and print nothing. If you <code>USE</code> the
                      <code>assert</code> plugin then you can add the <code>assert</code>
                      vmethod between the <code>user</code> and <code>name</code> elements,
                      like so:
                    </p>
                    <pre><span class="tt">[% user.assert.name %]</span></pre>
                    <p>
                      Now, if <code>user.name</code> is an undefined value, an exception will
                      be thrown:
                    </p>
                    <pre>assert error - undefined value for name</pre>
              </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) 2008 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/Plugin.php">Template::Plugin</a>
                    </p>
              </div>
            </div>
            
            </div>
<?php include(ABS_PATH . "/footer.php"); ?>
