The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hub::Apache2::Render</title>
<link rel="stylesheet" href="../../styles.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:Gentoo@livesitemail.(none)" />
</head>

<body>

<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<ul>

		<li><a href="#working_dir">WORKING_DIR</a></li>
		<li><a href="#conf_file">CONF_FILE</a></li>
		<li><a href="#debug">DEBUG</a></li>
		<li><a href="#notes">Notes</a></li>
	</ul>

	<li><a href="#public_methods">PUBLIC METHODS</a></li>
	<ul>

		<li><a href="#handler">handler</a></li>
		<li><a href="#process_request">process_request</a></li>
		<li><a href="#render">render</a></li>
		<li><a href="#mimic">mimic</a></li>
	</ul>

	<li><a href="#author">AUTHOR</a></li>
	<li><a href="#copyright">COPYRIGHT</a></li>
	<li><a href="#updated">UPDATED</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Hub::Apache2::Render - Apache2 mod_perl response handler for HTML pages</p>
<p>
<a href="#__index__"><small>Top</small></a>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
  &lt;LocationMatch &quot;/sample.*\.(html?|css|js)$&quot;&gt;
    &lt;IfModule mod_perl.c&gt;
      Options +ExecCGI
      SetHandler perl-script
      PerlOptions +ParseHeaders
      PerlResponseHandler Hub::Apache2::Render
      PerlSetEnv WORKING_DIR &quot;/var/www/html&quot;
  #   PerlSetEnv DEBUG &quot;1&quot;
  #   PerlSetEnv CONF_FILE &quot;custom.conf&quot;
    &lt;/IfModule&gt;
  &lt;/LocationMatch&gt;</pre>
<p>
<a href="#__index__"><small>Top</small></a>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p><strong>The working directory of the web site must be set.</strong> We will change to and run
in this directory.  This is also the reflected directory which limits the
request's scope.</p>
<p>
</p>
<h2><a name="working_dir">WORKING_DIR</a></h2>
<p>The working directory is just that.  Since multiple threads (hence multiple
sites) share this interpreter, a change to this directy is issued on each
request.</p>
<pre>
      PerlSetEnv WORKING_DIR &quot;/var/www/html&quot;</pre>
<p>
</p>
<h2><a name="conf_file">CONF_FILE</a></h2>
<p>By default configuration is read from a file named <code>.conf</code> in your working
directory.  To use a different one, specify it here.  It must reside beneath
your working directory, and this path is relative to the working directory.
For example:</p>
<pre>
      PerlSetEnv CONF_FILE &quot;/conf/custom.conf&quot;</pre>
<p>would resolve to:</p>
<pre>
      $WORKING_DIR/conf/custom.conf</pre>
<p>
</p>
<h2><a name="debug">DEBUG</a></h2>
<p>To generate debug messages (written to stderr), set this to a true value.</p>
<pre>
      PerlSetEnv DEBUG &quot;1&quot;</pre>
<p>
</p>
<h2><a name="notes">Notes</a></h2>
<pre>
  'Accept',               # Lists acceptable media types for the server to 
                          # present in response
  'Accept-Charset',       # Lists character sets the client will accept
  'Accept-Encoding',      # Lists encodings the client will accept
  'Accept-Language',      # Lists languages the client is most interested in
  'Authorization',        # A series of authorization fields
  'Cache-Control',        # Behavior intended to prevent caches from adversely 
                          # interfering with the request or response
  'Cookie',               # Decribes a client cookie
  'Host',                 # Name of the requested host server
  'If-Match',             # The entity tag of the client's cached version of 
                          # the requested resource
  'If-Modified-Since',    # An HTTP-formatted date for the server to use in 
                          # resource comparisons
  'If-None-Match',        # A list of entity tags representing the client's 
                          # possible cached resources
  'If-Unmodified-Since',  # An HTTP-formatted date for the server to use in 
                          # resource comparisons
  'Referer',              # An absolute or partial URI of the resource from 
                          # which the current request was obtained
  'User-Agent',           # A string identifying the client software</pre>
<p>
<a href="#__index__"><small>Top</small></a>
</p>
<hr />
<h1><a name="public_methods">PUBLIC METHODS</a></h1>
<p>
</p>
<h2><a name="handler">handler</a></h2>
<dl>
<dt><strong><a name="item_apache2_mode_perl_invocation_method">Apache2 mode_perl invocation method</a></strong>

</dl>
<p>
</p>
<h2><a name="process_request">process_request</a></h2>
<dl>
<dt><strong><a name="item_apache2_mod_perl_processor">Apache2 mod_perl processor</a></strong>

</dl>
<p>
</p>
<h2><a name="render">render</a></h2>
<dl>
<dt><strong><a name="item_worker_method">Worker method</a></strong>

</dl>
<p>
</p>
<h2><a name="mimic">mimic</a></h2>
<dl>
<dt><strong><a name="item_for_invoking_this_handler_from_the_command_2dline">For invoking this handler from the command-line</a></strong>

<dd>
<pre>
 Usage: mimic $script, $cgi_parameters
 Usage: mimic $script
For debugging, you may mimic a web request by:</pre>
</dd>
<dd>
<pre>
  cd $WORKING_DIR
  perl -MHub -e &quot;Hub::Apache2::Render::mimic()&quot; index.html</pre>
</dd>
</dl>
<p>
<a href="#__index__"><small>Top</small></a>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Ryan Gies (<a href="mailto:ryangies@livesite.net">ryangies@livesite.net</a>)</p>
<p>
<a href="#__index__"><small>Top</small></a>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (C) 2006-2007 by Livesite Networks, LLC. All rights reserved.</p>
<p>Copyright (C) 2000-2005 by Ryan Gies. All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are met:</p>
<p>* Redistributions of source code must retain the above copyright notice, 
this list of conditions and the following disclaimer.</p>
<p>* The origin of this software must not be misrepresented; you must not 
claim that you wrote the original software. If you use this software in a 
product, an acknowledgment in the product documentation would be 
appreciated but is not required.</p>
<p>* Altered source versions must be plainly marked as such, and must not be 
misrepresented as being the original software.</p>
<p>* The name of the author may not be used to endorse or promote products 
derived from this software without specific prior written permission.</p>
<p>THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
OF SUCH DAMAGE.</p>
<p>To the best of our knowledge, no patented algorithms have been used. However, we
do not have the resources to carry out a patent search, and therefore cannot 
give any guarantee of the above statement.</p>
<p>
<a href="#__index__"><small>Top</small></a>
</p>
<hr />
<h1><a name="updated">UPDATED</a></h1>
<p>08/02/2007</p>
<p><a href="#__index__"><small>Top</small></a></p>

</body>

</html>