Second pass at adding key files

This commit is contained in:
dsainty
2024-06-17 22:24:05 +10:00
parent aa25e9347f
commit b6fc94ff0f
923 changed files with 243184 additions and 0 deletions

View File

@ -0,0 +1,467 @@
<!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>GT::AutoLoader - load subroutines on demand</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#use">USE</a></li>
<li><a href="#compile_all">compile_all</a></li>
<li><a href="#requirements">REQUIREMENTS</a></li>
<li><a href="#caveats">CAVEATS</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::AutoLoader - load subroutines on demand</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
package GT::Module;
use GT::AutoLoader; # You now have an AUTOLOAD subroutine that will check for entries in %COMPILE</pre>
<p>or</p>
<pre>
package GT::OtherModule;
use GT::AutoLoader(NAME =&gt; '_AUTOLOAD'); # Import AUTOLOAD as _AUTOLOAD, define our own AUTOLOAD
sub AUTOLOAD {
...
goto &amp;_AUTOLOAD;
}</pre>
<p>then:</p>
<pre>
$COMPILE{sub} = __LINE__ . &lt;&lt;'END_OF_SUB';
sub method_name {
...
}
END_OF_SUB</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The <strong>GT::AutoLoader</strong> module works as a way to speed up your code. Currently,
the only thing it does is scan for a %COMPILE hash in your package. If it finds
it, it looks for the subroutine you called, and if found compiles and runs it.</p>
<p>If unable to find a subroutine to compile in %COMPILE, <strong>GT::AutoLoader</strong> will
scan your inheritance tree (@ISA) for another AUTOLOAD subroutine to pass this
off to. If there isn't any, a fatal error occurs.</p>
<p>To use <strong>GT::AutoLoader</strong>, in its standard behaviour, simply put:
<code>use GT::AutoLoader;</code> in your module. When you use GT::AutoLoader, two things
will happen. First, an <code>AUTOLOAD</code> subroutine will be imported into your
namespace that will automatically compile your subroutines only when they are
needed, thus speeding up compile time. Secondly, a %COMPILE hash will be defined
in your package, eliminating the need for you to: use vars qw/%COMPILE/;</p>
<p>
</p>
<hr />
<h1><a name="use">USE</a></h1>
<p>You can pass options to GT::AutoLoader to change the behaviour of the module.
Currently, logging is the only option, however more options (perhaps including
a different compiling scheme) will be added at some future point.</p>
<p>Options are specified as <code>import()</code> arguments. For example:</p>
<pre>
use GT::AutoLoader(OPTION =&gt; &quot;value&quot;);</pre>
<dl>
<dt><strong><a name="item_name">NAME</a></strong><br />
</dt>
<dd>
If you want to import the autoload subroutine as something other than
'Package::AUTOLOAD', the 'NAME' option should be used. Its value is the name
to import as. For example, to import a GT::AutoLoader AUTOLOAD named _AUTOLOAD
(this is useful when declaring your own AUTOLOAD behaviour, but still using
GT::AutoLoader's behaviour as a fallback), you would do something like:
</dd>
<dd>
<pre>
use GT::AutoLoader(NAME =&gt; '_AUTOLOAD');</pre>
</dd>
<p></p>
<dt><strong><a name="item_log">LOG</a></strong><br />
</dt>
<dd>
Takes a code reference as its value. The code reference will be called three
arguments - the package name, the name of the function, and the autoload method
(Currently only 'COMPILE'). Note that this will be called for ALL autoloaded
subroutines, not just the ones in your package.
</dd>
<dd>
<p>WARNING - you cannot put code in your log that relies on autoloaded methods -
you'll end up throwing the program into an infinite loop.</p>
</dd>
<dd>
<p>For example, to get a line of debugging after each subroutine is compiled, you
could <code>use GT::AutoLoader</code> like this:</p>
</dd>
<dd>
<pre>
use GT::AutoLoader(LOG =&gt; sub {
print &quot;Compiled $_[1] in package $_[0]\n&quot;
});</pre>
</dd>
<p></p>
<dt><strong><a name="item_next">NEXT</a></strong><br />
</dt>
<dd>
Normally, GT::AutoLoader will look for another AUTOLOAD to call in your
package's @ISA inheritance tree. You can alter this behaviour and tell
GT::AutoLoader what to call next using the NEXT option.
</dd>
<dd>
<p>For example, if you have a sub _AUTOLOAD { } that you wanted to call if the
method isn't found by GT::AutoLoader, you would use GT::AutoLoader like this:</p>
</dd>
<dd>
<pre>
use GT::AutoLoader(NEXT =&gt; 'Package::Name::_AUTOLOAD');</pre>
</dd>
<dd>
<p>The _AUTOLOAD function in your package will now be called if GT::AutoLoader
can't load the method on its own. $AUTOLOAD will be set for you in whichever
package the function you provide is in. Note that if you simply want to use an
inherited AUTOLOAD, you <strong>should not</strong> use this option; GT::AutoLoader will
handle that just fine on its own.</p>
</dd>
<dd>
<p>You may omit the package (Package::Name::) if the function is in your current
package.</p>
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="compile_all">compile_all</a></h1>
<p>A function exists in GT::AutoLoader to compile all %COMPILE-subroutines. By
default (without arguments) <code>compile_all()</code> compiles every %COMPILE-subroutine in
every package that has used GT::AutoLoader. You can, however, pass in a list of
packages which <code>compile_all()</code> will check instead of compiling everything. Note
that GT::AutoLoader will only compile %COMPILE-subroutines in packages that
have used GT::AutoLoader, so if you specify package ``Foo'', but ``Foo'' hasn't
used GT::AutoLoader, it will be ignored.</p>
<p>You can do something like:</p>
<pre>
GT::AutoLoader::compile_all(__PACKAGE__) if MOD_PERL;</pre>
<p>to have a GT::AutoLoader compile every %COMPILE-subroutine in the current
package automatically under mod_perl, or you could add this code to your
mod_perl startup file or test script:</p>
<pre>
GT::AutoLoader::compile_all;</pre>
<p>Test scripts should definately use <code>compile_all()</code> to ensure that all subroutines
compile correctly!</p>
<p>
</p>
<hr />
<h1><a name="requirements">REQUIREMENTS</a></h1>
<p>None.</p>
<p>
</p>
<hr />
<h1><a name="caveats">CAVEATS</a></h1>
<p>Due to the nature of Perl's AUTOLOAD handling, you must take care when using
GT::AutoLoader in a subclass. In short, subclassed methods <strong>MUST NOT</strong> be put
into the %COMPILE hash.</p>
<p>The problem is that since the subroutine does not exist in the package, Perl,
while decending the inheritance tree, will not see it but will probably see the
parent's method (unless nothing else has called the method, but you should
never count on that), and call it rather than looking for your package's
AUTOLOAD.</p>
<p>This isn't to say that subclasses cannot use AUTOLOAD - just that subclasses
cannot use autoloaded methods (%COMPILE-subroutines) if a method of the same
name exists in the parent class. Autoloaded function calls are not affected.</p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Base.html">the GT::Base manpage</a></p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: AutoLoader.pm,v 1.13 2005/03/21 06:57:58 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,427 @@
<!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>GT::Base - Common base module to be inherited by all classes.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#debugging">Debugging</a></li>
<li><a href="#error_handling">Error Handling</a></li>
<li><a href="#error_trapping">Error Trapping</a></li>
<li><a href="#stack_trace">Stack Trace</a></li>
<li><a href="#accessor_methods">Accessor Methods</a></li>
<li><a href="#parameter_parsing">Parameter Parsing</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Base - Common base module to be inherited by all classes.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Base;
use vars qw/@ISA $ATTRIBS $ERRORS/
@ISA = qw/GT::Base/;
$ATTRIBS = {
accessor =&gt; default,
accessor2 =&gt; default,
};
$ERRORS = {
BADARGS =&gt; &quot;Invalid argument: %s passed to subroutine: %s&quot;,
};</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Base is a base class that is used to provide common error handling,
debugging, creators and accessor methods.</p>
<p>To use GT::Base, simply make your module inherit from GT::Base. That
will provide the following functionality:</p>
<p>
</p>
<h2><a name="debugging">Debugging</a></h2>
<p>Two new methods are available for debugging:</p>
<pre>
$self-&gt;debug($msg, [DEBUG_LEVEL]);</pre>
<p>This will send a $msg to STDERR if the current debug level is greater
then the debug level passed in (defaults to 1).</p>
<pre>
$self-&gt;debug_level(DEBUG_LEVEL);
Class-&gt;debug_level(DEBUG_LEVEL);</pre>
<p>You can call <code>debug_level()</code> to set or get the debug level. It can
be set per object by calling it as an object method, or class wide
which will initilize all new objects with that debug level (only if
using the built in creator).</p>
<p>The debugging uses a package variable:</p>
<pre>
$Class::DEBUG = 0;</pre>
<p>and assumes it exists.</p>
<p>
</p>
<h2><a name="error_handling">Error Handling</a></h2>
<p>Your object can now generate errors using the method:</p>
<pre>
$self-&gt;error(CODE, LEVEL, [args]);</pre>
<p>CODE should be a key to a hash of error codes to user readable
error messages. This hash should be stored in $ERRORS which is
defined in your pacakge, or the package named in $ERROR_MESSAGE.</p>
<p>LEVEL should be either 'FATAL' or 'WARN'. If not specified it defaults
to FATAL. If it's a fatal error, the program will print the message
to STDERR and die.</p>
<p>args can be used to format the error message. For instance, you can
defined commonly used errors like:</p>
<pre>
CANTOPEN =&gt; &quot;Unable to open file: '%s': %s&quot;</pre>
<p>in your $ERRORS hash. Then you can call error like:</p>
<pre>
open FILE, &quot;somefile.txt&quot;
or return $self-&gt;error(CANTOPEN =&gt; FATAL =&gt; &quot;somefile.txt&quot;, &quot;$!&quot;);</pre>
<p>The error handler will format your message using sprintf(), so all
regular printf formatting strings are allowed.</p>
<p>Since errors are kept within an array, too many errors can pose a
memory problem. To clear the error stack simply call:</p>
<pre>
$self-&gt;clear_errors();</pre>
<p>
</p>
<h2><a name="error_trapping">Error Trapping</a></h2>
<p>You can specify at run time to trap errors.</p>
<pre>
$self-&gt;catch_errors(\&amp;code_ref);</pre>
<p>which sets a $SIG{__DIE__} handler. Any fatal errors that occur, will
run your function. The function will not be run if the fatal was thrown
inside of an eval though.</p>
<p>
</p>
<h2><a name="stack_trace">Stack Trace</a></h2>
<p>You can print out a stack trace at any time by using:</p>
<pre>
$self-&gt;stack_trace(1);
Class-&gt;stack_trace(1);</pre>
<p>If you pass in 1, the stack trace will be returned as a string, otherwise
it will be printed to STDOUT.</p>
<p>
</p>
<h2><a name="accessor_methods">Accessor Methods</a></h2>
<p>Using GT::Base automatically provides accessor methods for all your
attributes. By specifying:</p>
<pre>
$ATTRIBS = {
attrib =&gt; 'default',
...
};</pre>
<p>in your package, you can now call:</p>
<pre>
my $val = $obj-&gt;attrib();
$obj-&gt;attrib($set_val);</pre>
<p>to set and retrieve the attributes for that value.</p>
<p>Note: This uses AUTOLOAD, so if you implement AUTOLOAD in your package,
you must have it fall back to GT::Base::AUTOLOAD if it fails. This
can be done with:</p>
<pre>
AUTOLOAD {
...
goto &amp;GT::Base::AUTOLOAD;
}</pre>
<p>which will pass all arguments as well.</p>
<p>
</p>
<h2><a name="parameter_parsing">Parameter Parsing</a></h2>
<p>GT::Base also provides a method to parse parameters. In your methods you
can do:</p>
<pre>
my $self = shift;
my $parm = $self-&gt;common_param(@_);</pre>
<p>This will convert any of a hash reference, hash or CGI object into a hash
reference.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Base.pm,v 1.132 2005/06/22 19:59:25 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,474 @@
<!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>GT::CGI - a lightweight replacement for CGI.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#param__accessing_form_input_">param - Accessing form input.</a></li>
<li><a href="#header____printing_http_headers"><code>header()</code> - Printing HTTP headers</a></li>
<li><a href="#redirect__redirecting_to_new_url_">redirect - Redirecting to new URL.</a></li>
<li><a href="#cookie__set_get_http_cookies_">cookie - Set/Get HTTP Cookies.</a></li>
<li><a href="#url__retrieve_the_current_url_">url - Retrieve the current URL.</a></li>
<li><a href="#get_hash__return_all_form_input_as_hash_">get_hash - Return all form input as hash.</a></li>
<li><a href="#escape__url_escape_a_string_">escape - URL escape a string.</a></li>
<li><a href="#unescape__url_unescape_a_string_">unescape - URL unescape a string.</a></li>
<li><a href="#html_escape__html_escape_a_string">html_escape - HTML escape a string</a></li>
<li><a href="#html_unescape__html_unescapes_a_string">html_unescape - HTML unescapes a string</a></li>
</ul>
<li><a href="#dependencies">DEPENDENCIES</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::CGI - a lightweight replacement for CGI.pm</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::CGI;
my $in = new GT::CGI;
foreach my $param ($in-&gt;param) {
print &quot;VALUE: $param =&gt; &quot;, $in-&gt;param($param), &quot;\n&quot;;
}</pre>
<pre>
use GT::CGI qw/-no_parse_buttons/;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::CGI is a lightweight replacement for CGI.pm. It implements most of the
functionality of CGI.pm, with the main difference being that GT::CGI does not
provide a function-based interface (with the exception of the escape/unescape
functions, which can be called as either function or method), nor does it
provide the HTML functionality provided by CGI.pm.</p>
<p>The primary motivation for this is to provide a CGI module that can be shipped
with Gossamer products, not having to depend on a recent version of CGI.pm
being installed on remote servers. The secondary motivation is to provide a
module that loads and runs faster, thus speeding up Gossamer products.</p>
<p>Credit and thanks goes to the author of CGI.pm. A lot of the code (especially
file upload) was taken from CGI.pm.</p>
<p>
</p>
<h2><a name="param__accessing_form_input_">param - Accessing form input.</a></h2>
<p>Can be called as either a class method or object method. When called with no
arguments a list of keys is returned.</p>
<p>When called with a single argument in scalar context the first (and possibly
only) value is returned. When called in list context an array of values is
returned.</p>
<p>When called with two arguments, it sets the key-value pair.</p>
<p>
</p>
<h2><a name="header____printing_http_headers"><code>header()</code> - Printing HTTP headers</a></h2>
<p>Can be called as a class method or object method. When called with no
arguments, simply returns the HTTP header.</p>
<p>Other options include:</p>
<dl>
<dt><strong><a name="item__2dforce__3d_3e_1">-force =&gt; 1</a></strong><br />
</dt>
<dd>
Force printing of header even if it has already been displayed.
</dd>
<p></p>
<dt><strong><a name="item__2dtype__3d_3e__27text_2fplain_27">-type =&gt; 'text/plain'</a></strong><br />
</dt>
<dd>
Set the type of the header to something other then text/html.
</dd>
<p></p>
<dt><strong><a name="item__2dcookie__3d_3e__24cookie">-cookie =&gt; $cookie</a></strong><br />
</dt>
<dd>
Display any cookies. You can pass in a single GT::CGI::Cookie object, or an
array of them.
</dd>
<p></p>
<dt><strong><a name="item__2dnph__3d_3e_1">-nph =&gt; 1</a></strong><br />
</dt>
<dd>
Display full headers for nph scripts.
</dd>
<p></p></dl>
<p>If called with a single argument, sets the Content-Type.</p>
<p>
</p>
<h2><a name="redirect__redirecting_to_new_url_">redirect - Redirecting to new URL.</a></h2>
<p>Returns a Location: header to redirect a user.</p>
<p>
</p>
<h2><a name="cookie__set_get_http_cookies_">cookie - Set/Get HTTP Cookies.</a></h2>
<p>Sets or gets a cookie. To retrieve a cookie:</p>
<pre>
my $cookie = $cgi-&gt;cookie ('key');
my $cookie = $cgi-&gt;cookie (-name =&gt; 'key');</pre>
<p>or to retrieve a hash of all cookies:</p>
<pre>
my $cookies = $cgi-&gt;cookie;</pre>
<p>To set a cookie:</p>
<pre>
$c = $cgi-&gt;cookie (-name =&gt; 'foo', -value =&gt; 'bar')</pre>
<p>You can also specify -expires for when the cookie should expire, -path for
which path the cookie valid, -domain for which domain the cookie is valid, and
-secure if the cookie is only valid for secure sites.</p>
<p>You would then set the cookie by passing it to the header function:</p>
<pre>
print $in-&gt;header ( -cookie =&gt; $c );</pre>
<p>
</p>
<h2><a name="url__retrieve_the_current_url_">url - Retrieve the current URL.</a></h2>
<p>Returns the current URL of the script. It defaults to display just the script
name and query string.</p>
<p>Options include:</p>
<dl>
<dt><strong><a name="item_absolute__3d_3e_1">absolute =&gt; 1</a></strong><br />
</dt>
<dd>
Return the full URL: <a href="http://domain/path/to/script.cgi">http://domain/path/to/script.cgi</a>
</dd>
<p></p>
<dt><strong><a name="item_relative__3d_3e_1">relative =&gt; 1</a></strong><br />
</dt>
<dd>
Return only the script name: script.cgi
</dd>
<p></p>
<dt><strong><a name="item_query_string__3d_3e_1">query_string =&gt; 1</a></strong><br />
</dt>
<dd>
Return the query string as well: script.cgi?a=b
</dd>
<p></p>
<dt><strong><a name="item_path_info__3d_3e_1">path_info =&gt; 1</a></strong><br />
</dt>
<dd>
Returns the path info as well: script.cgi/foobar
</dd>
<p></p>
<dt><strong><a name="item_remove_empty__3d_3e_0">remove_empty =&gt; 0</a></strong><br />
</dt>
<dd>
Removes empty query= from the query string.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="get_hash__return_all_form_input_as_hash_">get_hash - Return all form input as hash.</a></h2>
<p>This returns the current parameters as a hash. Any values that have the same
key will be returned as an array reference of the multiple values.</p>
<p>
</p>
<h2><a name="escape__url_escape_a_string_">escape - URL escape a string.</a></h2>
<p>Returns the passed in value URL escaped. Can be called as class method or
object method.</p>
<p>
</p>
<h2><a name="unescape__url_unescape_a_string_">unescape - URL unescape a string.</a></h2>
<p>Returns the passed in value URL un-escaped. Can be called as class method or
object method. Optionally can take an array reference of strings instead of a
string. If called in this method, the values of the array reference will be
directly altered.</p>
<p>
</p>
<h2><a name="html_escape__html_escape_a_string">html_escape - HTML escape a string</a></h2>
<p>Returns the passed in value HTML escaped. Translates &amp;, &lt;, &gt; and `` to their
html equivalants.</p>
<p>
</p>
<h2><a name="html_unescape__html_unescapes_a_string">html_unescape - HTML unescapes a string</a></h2>
<p>Returns the passed in value HTML unescaped.</p>
<p>
</p>
<hr />
<h1><a name="dependencies">DEPENDENCIES</a></h1>
<p>Note: GT::CGI depends on <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Base.html">the GT::Base manpage</a> and <a href="glist.cgi?do=admin_gtdoc&topic=/GT/AutoLoader.html">the GT::AutoLoader manpage</a>, and if you are
performing file uploads, GT::CGI::MultiPart, GT::CGI::Fh, and <a href="glist.cgi?do=admin_gtdoc&topic=/GT/TempFile.html">the GT::TempFile manpage</a>.
The ability to set cookies requires GT::CGI::Cookie.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: CGI.pm,v 1.145 2005/06/21 21:02:57 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/Action.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/Action/Common.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/Action/Plugin.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/Cookie.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/EventLoop.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/Fh.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/CGI/MultiPart.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,343 @@
<!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>GT::Cache - Tied hash which caches output of functions.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#example">EXAMPLE</a></li>
<li><a href="#notes">NOTES</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Cache - Tied hash which caches output of functions.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Cache;
my %cache;
tie %cache, 'GT::Cache', $size, \&amp;function;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Cache implements a simple but quick caching scheme for remembering
the results of functions. It also implements a max size to prevent
the cache from growing and drops least frequently requested entries
first, making it very useful under mod_perl.</p>
<p>
</p>
<hr />
<h1><a name="example">EXAMPLE</a></h1>
<pre>
use GT::Cache;
my %cache;
tie %cache, 'GT::Cache', 100, \&amp;complex_func;
while (&lt;&gt;) {
print &quot;RESULT: &quot;, $cache{$_}, &quot;\n&quot;;
}</pre>
<pre>
sub complex_func {
my $input = shift;
# .. do complex work.
return $output;
}</pre>
<p>This will cache the results of complex_func, and only run it when
the input is different. It stores a max of 100 entries at a time,
with the least frequently requested getting dropped first.</p>
<p>
</p>
<hr />
<h1><a name="notes">NOTES</a></h1>
<p>Currently, you can only pass as input to the function a single
scalar, and the output must be a single scalar. See the
Memoize module in CPAN for a much more robust implementation.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Cache.pm,v 1.13 2004/01/13 01:35:15 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,601 @@
<!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>GT::Config - Dumped-hash configuration handler</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#load">load</a></li>
<li><a href="#save">save</a></li>
<li><a href="#cache_hit">cache_hit</a></li>
<li><a href="#inheritance">inheritance</a></li>
<li><a href="#create_ok">create_ok</a></li>
<li><a href="#tmpfile">tmpfile</a></li>
<li><a href="#cache">cache</a></li>
<li><a href="#debug_level">debug_level</a></li>
<li><a href="#header">header</a></li>
<li><a href="#sort_order">sort_order</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Config - Dumped-hash configuration handler</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Config;
my $Config = GT::Config-&gt;load($config_file);
...
print $Config-&gt;{variable};
...
$Config-&gt;{othervar} = &quot;something&quot;;
...
$Config-&gt;save;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Config provides a simple way to handle loading config files. It can load
and save any config file consisting of a dumped hash. You can then use the
object as if it were the actual hash reference from the config file. It
supports template set inheritance (see <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template.html">the GT::Template manpage</a>) and mtime-based
caching.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>
</p>
<h2><a name="load">load</a></h2>
<p>There is no <code>new()</code> method. To get a new config object you do:</p>
<pre>
$Config = GT::Config-&gt;load(&quot;/path/to/config/file&quot;, { options });</pre>
<p>The first argument is the full path to the file to open to read the
configuration. The file does not necessarily have to exist - see the options
below.</p>
<p>The second argument is a hash reference of options, and is optional. The
possible options are:</p>
<dl>
<dt><strong><a name="item_inheritance">inheritance</a></strong><br />
</dt>
<dd>
If provided as something true, GT::Config will scan for .tplinfo files looking
for inherited template sets. This is typically used for loading globals.txt or
language.txt files from Gossamer Threads products' template sets.
</dd>
<dd>
<p>Defaults to off.</p>
</dd>
<p></p>
<dt><strong><a name="item_local">local</a></strong><br />
</dt>
<dd>
If provided as something true, GT::Config will look for a ``local'' directory
containing the file. When using inheritance, a ``local'' directory will also be
looked for in each inherited configuration file. However, regardless of the
<a href="#item_inheritance"><code>inheritance</code></a> option, ``local'' configuration files always inherit from their
non-local counterpart.
</dd>
<dd>
<p>Additionally, this option causes GT::Config to save the file into a ``local''
directory. Also note that the ``local'' file will _only_ contain keys that were
already in the local file, or were assigned to the config object after loading
the file.</p>
</dd>
<dd>
<p>Defaults to off.</p>
</dd>
<p></p>
<dt><strong><a name="item_cache">cache</a></strong><br />
</dt>
<dd>
If provided, will look in the internal cache for a cached copy of the file. If
none is found, a new GT::Config object will be constructed as usual, then saved
in the cache.
</dd>
<dd>
<p>Defaults to on. You must pass <code>cache =&gt; 0</code> to disable cached loading.
Note that new objects are always stored in the cache, allowing you to specify
<code>cache =&gt; 0</code> to force a reload of a cached file.</p>
</dd>
<p></p>
<dt><strong><a name="item_create_ok">create_ok</a></strong><br />
</dt>
<dd>
If set, you'll still get back a GT::Config hash even if the file doesn't exist.
You can then <code>save()</code> the object to create a new config file. If this option is
not set, a fatal error will occur when attempting to load a file that does not
exist.
</dd>
<dd>
<p>Defaults to off. Pass in <code>create_ok =&gt; 1</code> if the config file doesn't
necessarily have to exist (i.e. when creating a new config file).</p>
</dd>
<p></p>
<dt><strong><a name="item_empty">empty</a></strong><br />
</dt>
<dd>
The <a href="#item_empty"><code>empty</code></a> option is used to create a new, blank config file - it can be
thought of as a forced version of the <a href="#item_create_ok"><code>create_ok</code></a> option. It won't read
<strong>any</strong> files during loading (and as such completely ignores the <a href="#item_inheritance"><code>inheritance</code></a>
and <a href="#item_cache"><code>cache</code></a> options). This is mainly intended to be used when a complete
replacement of a file is desired, regardless of what is currently on disk.
</dd>
<p></p>
<dt><strong><a name="item_chmod">chmod</a></strong><br />
</dt>
<dd>
The <a href="#item_chmod"><code>chmod</code></a> option is used to specify the mode of the saved file. It must be
passed in octal form, such as 0644 (but <strong>not</strong> in string form, such as
<code>&quot;0644&quot;</code>). The default is 0666, to allow writing by any users. Though not
terribly secure, this is the sort of environment most CGI scripts require.
Setting a chmod value of undef instructs GT::Config to not perform a chmod.
</dd>
<p></p>
<dt><strong><a name="item_strict">strict</a></strong><br />
</dt>
<dd>
If set, a fatal error will occur when attempting to access a key of the config
file that does not exist. Note, however, that this only covers the first level
data structions - <code>$CFG-&gt;{foo}-&gt;{bar}</code> will not fatal if <code>foo</code> is a
hash ref, but <code>bar</code> is not set in that hash reference. <code>$CFG-&gt;{foo}</code>
(and <code>$CFG-&gt;{foo}-&gt;{bar}</code>) will fatal if the key <code>foo</code> does not exist
in the config data.
</dd>
<p></p>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
If provided, debugging information will be printed. This will also cause a
warning to occur if <a href="#fatal">fatal</a> is disabled and load fails.
</dd>
<dd>
<p>Defaults to disabled. Should not be used in production code, except when
debugging.</p>
</dd>
<p></p>
<dt><strong><a name="item_tmpfile">tmpfile</a></strong><br />
</dt>
<dd>
Instructs GT::Config to attempt to use a temporary file when saving. If used,
the contents will be written to a temporary file, then, if successfully
written, the temporary file will be moved to overwrite the real file. This
solves a couple of problems. Firstly, a full disk will never result in a
partial file as if the entire file is not written to the temporary file, it
will not overwrite the file already stored on disk. Secondly, it avoids a
potential problem with multiple processes attempting to write to the file at
the same time.
</dd>
<dd>
<p>The following values are accepted:</p>
</dd>
<dd>
<pre>
0 - Do not use a temporary file
undef - Use a temporary file if the base directory is writable
1 - Always use a temporary file</pre>
</dd>
<dd>
<p>The default is <code>undef</code>, which will attempt to use a temporary file is
possible, but won't fail if the script has permission to modify existing files,
but not to create new ones.</p>
</dd>
<p></p>
<dt><strong><a name="item_header">header</a></strong><br />
</dt>
<dd>
If provided, when saving a file this header will be written above the data.
Keep in mind that the file must be Perl-compilable, so be careful if you are
doing anything more than comments.
</dd>
<dd>
<p>Note that the header may contain the string <code>[localtime]</code>, which will be
replaced with the return value of <code>scalar localtime()</code> when saving, which is
generally a value such as: <code>Sun Jan 25 15:12:26 2004</code>.</p>
</dd>
<p></p>
<dt><strong><a name="item_tab">tab</a></strong><br />
</dt>
<dd>
If provided, this will set what to use for tabs when calling save(). Defaults
to an actual tab, since that cuts down the file size over using multiple
spaces, while leaving the file readable.
</dd>
<p></p>
<dt><strong><a name="item_compile_subs">compile_subs</a></strong><br />
</dt>
<dd>
If provided, any data starting with <code>sub {</code> will be compiled into a
subroutine. This compilation does not happen until the variable is accessed,
at which point a fatal error will occur if the code could not be compiled. The
code referenced will be cached (if using caching), but will be saved as the
original string (starting with <code>sub {</code>) when <a href="#save">saving</a>.
</dd>
<dd>
<p><strong>NOTE:</strong> The argument to compile_subs must be a valid perl package; the code
reference will be compiled in that package. For example,
<code>compile_subs =&gt; 'GForum::Post'</code> will compile the code ref in the
GForum::Post package. You need to do this to provide access to globals
variables such as $DB, $IN, etc.</p>
</dd>
<p></p>
<dt><strong><a name="item_sort_order">sort_order</a></strong><br />
</dt>
<dd>
If provided, the option will be passed through as the 'order' option of
GT::Dumper for hash key ordering. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Dumper.html">the GT::Dumper manpage</a>. GT::Config always sorts
hash keys - this can be used when the default alphanumeric sort is not
sufficient.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="save">save</a></h2>
<p>To save a config file, simply call <code>$object-&gt;save()</code>. If the object uses
inheritance, only those keys that were not inherited (or were modified from the
inherited ones) will be saved.</p>
<pre>
$Config-&gt;save();</pre>
<p><strong>NOTE</strong>: <strong>ALWAYS SAVE AFTER MAKING ANY CHANGES!!!</strong>. If you do not save after
making changes, the data retrieved from the cache may not be the same as the
data stored in the configuration file on disk. After making ANY changes make
absolutely sure that you either undo the change or save the configuration file.</p>
<p>
</p>
<h2><a name="cache_hit">cache_hit</a></h2>
<p>Returns whether or not the current object was loaded from cache (1) or loaded
from disk (undef).</p>
<p>
</p>
<h2><a name="inheritance">inheritance</a></h2>
<p>Returns the inheritance status (1 or 0) of the object.</p>
<p>
</p>
<h2><a name="create_ok">create_ok</a></h2>
<p>Returns the status (1 or 0) of the ``create_ok'' flag.</p>
<p>
</p>
<h2><a name="tmpfile">tmpfile</a></h2>
<p>With no arguments, returns whether or not the object will attempt to use a
temporary file when saving. Possible values are:</p>
<pre>
0 - Do not use a temporary file
undef - Use a temporary file if the base directory is writable
1 - Always use a temporary file</pre>
<p>You can pass in a single argument of one of the above values to set whether or
not the object will use a temporary file when saving.</p>
<p>
</p>
<h2><a name="cache">cache</a></h2>
<p>This method returns whether or not the object is cached. This cannot be
enabled/disabled after loading a config file; you must specify it as an
argument to <code>load()</code> instead.</p>
<p>
</p>
<h2><a name="debug_level">debug_level</a></h2>
<p>This method returns the current debug level.</p>
<p>You may provide one argument which sets a new debug level.</p>
<p>0 means no debugging, 1 means basic debugging, 2 means heavy debugging.</p>
<p>If setting a new debug level, the old debug level is returned.</p>
<p>
</p>
<h2><a name="header">header</a></h2>
<p>This method returns or sets the header that will be printed when saving.</p>
<p>With no arguments, returns the header.</p>
<p>You may provide one argument which sets a new header. Keep in mind that the
file must be Perl-compilable, so take care if doing anything other than
comments.</p>
<p>If providing a new header, the old header is returned.</p>
<p>Note that the header may contain the value <code>[localtime]</code>, which will be
replaced with the return value of <code>scalar localtime()</code> when saving.</p>
<p>
</p>
<h2><a name="sort_order">sort_order</a></h2>
<p>This method returns or sets a code reference to be passed through as the
'order' option of GT::Dumper for hash key ordering. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Dumper.html">the GT::Dumper manpage</a>.
GT::Config always sorts hash keys - this can be used when the default
alphanumeric sort is not sufficient.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Inheritance.html">the GT::Template::Inheritance manpage</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>$Id: Config.pm,v 1.45 2005/03/21 05:49:39 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,489 @@
<!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>GT::Date - Common date parsing and manipulation routines</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#date_is_valid">date_is_valid</a></li>
<li><a href="#date_is_greater">date_is_greater</a></li>
<li><a href="#date_is_smaller">date_is_smaller</a></li>
<li><a href="#date_get_date_get_gm">date_get date_get_gm</a></li>
<li><a href="#date_comp">date_comp</a></li>
<li><a href="#date_diff">date_diff</a></li>
<li><a href="#date_add_date_add_gm">date_add date_add_gm</a></li>
<li><a href="#date_sub_date_sub_gm">date_sub date_sub_gm</a></li>
<li><a href="#timegm">timegm</a></li>
<li><a href="#timlocal">timlocal</a></li>
<li><a href="#parse_format">parse_format</a></li>
<li><a href="#format_date">format_date</a></li>
<li><a href="#setting_date_format">Setting date format</a></li>
<li><a href="#transforming_between_date_formats_">Transforming between date formats.</a></li>
<li><a href="#getting_the_gm_offset_">Getting the GM offset.</a></li>
</ul>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Date - Common date parsing and manipulation routines</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Date qw/:all/;
my $date = date_get();
my $next_week = date_add($date, 7);
my $is_bigger = date_is_greater($date, $next_week);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Date provides several functions useful in parsing dates, and
doing date manipulation. Under the hood, it uses Time::Local
code to transform a date into seconds for comparison and
mathematical operations. It also uses <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Cache.html">the GT::Cache manpage</a> to store
most of the complex work.</p>
<p>No functions are exported by default. You can either specify
the functions you need in use, or use the tags ':all' or
':timelocal'. All will give you all functions, and timelocal
will give you functions found in Time::Local.</p>
<p>GT::Date uses a package global $DATE_FMT which specifies
the format that dates should be returned in. You can change this using
the <code>date_set_format()</code> function.</p>
<p>
</p>
<h2><a name="date_is_valid">date_is_valid</a></h2>
<p>Returns 1 if the argument passed in is a valid date. It must first
be in the current date format, and then be a valid date.</p>
<p>
</p>
<h2><a name="date_is_greater">date_is_greater</a></h2>
<p>Returns 1 if argument 1 is greater then argument 2, otherwise 0.</p>
<p>
</p>
<h2><a name="date_is_smaller">date_is_smaller</a></h2>
<p>Returns 1 if argument 1 is smaller then argument 2, otherwise 0.</p>
<p>
</p>
<h2><a name="date_get_date_get_gm">date_get date_get_gm</a></h2>
<p>Called with no arguments, returns the current date based on system
time. You can specify the date you want by passing in the seconds
since epoch (output of time()).</p>
<p>
</p>
<h2><a name="date_comp">date_comp</a></h2>
<p>Equivalent to arg1 &lt;=&gt; arg2.</p>
<p>
</p>
<h2><a name="date_diff">date_diff</a></h2>
<p>Returns number of days difference between arg1 - arg2.</p>
<p>
</p>
<h2><a name="date_add_date_add_gm">date_add date_add_gm</a></h2>
<p>Returns date derived from arg1 + arg2, where the second argument
can be either a date or number of days.</p>
<p>
</p>
<h2><a name="date_sub_date_sub_gm">date_sub date_sub_gm</a></h2>
<p>Returns date derived from arg1 - arg2, where the second argument
can be either a date or number of days.</p>
<p>
</p>
<h2><a name="timegm">timegm</a></h2>
<p>Takes the returned array from <code>gmtime()</code> and returns a unix time
stamp.</p>
<p>
</p>
<h2><a name="timlocal">timlocal</a></h2>
<p>Takes the array returned by <code>localtime()</code> and returns a unix time
stamp.</p>
<p>
</p>
<h2><a name="parse_format">parse_format</a></h2>
<p>Takes a string and a date format and returns an array
ref of the first 7 arguments returned by localtime().</p>
<p>
</p>
<h2><a name="format_date">format_date</a></h2>
<p>Takes a localtime array, and a format string and returns a string
of the parsed format.</p>
<p>
</p>
<h2><a name="setting_date_format">Setting date format</a></h2>
<p>You can use date_set_format to change the format. You pass in a
format string. It is made up of:</p>
<pre>
%yyyy% four digit year as in 1999
%yy% two digit year as in 99
%y% two digit year without leading 0
%mmmm% long month name as in January
%mmm% short month name as in Jan
%mm% numerical month name as in 01
%m% numerical month name without leading 0 as in 1
%dddd% long day name as in Sunday
%ddd% short day name as in Sun
%dd% numerical date
%d% numerical date without leading 0
%HH% two digit hour, 24 hour time
%H% one or two digit hour, 24 hour time
%hh% two digit hour, 12 hour time. 0 becomes 12.
%h% one or two digit hour, 12 hour time. 0 becomes 12.
%MM% two digit minute
%M% one or two digit minute (when would someone ever WANT this?)
%ss% two digit second
%s% one ot two digit second (when would someone ever WANT this?)
%tt% AM or PM (use with 12 hour time)
%o% + or - GMT offset</pre>
<p>Common formats include:</p>
<pre>
%yyyy%-%mm%-%dd% 1999-12-25
%dd%-%mmm%-%yyyy% 12-Dec-1999
%ddd% %mmm% %dd% %yyyy% Sat Dec 12 1999
%ddd% %mmm% %dd% %yyyy% Sat Dec 12 1999</pre>
<p>or RFC822 mime mail format:</p>
<pre>
%ddd%, %dd% %mmm% %yyyy% %HH%:%MM%:%ss% %o% Sat, 12, Dec 1999 21:32:02 -0800</pre>
<p>or MySQL format:</p>
<pre>
%yyyy%-%mm%-%dd% %HH%:%MM%:%ss% 1999-03-25 21:32:02</pre>
<p>The language used for month names and day names can be changed with
date_set_month(), date_set_days(), <code>date_set_days_short()</code> and
date_set_month_short().</p>
<p>
</p>
<h2><a name="transforming_between_date_formats_">Transforming between date formats.</a></h2>
<p>You can transform a date from one format to another with:</p>
<pre>
date_transform ($date, $orig_fmt, $new_fmt);</pre>
<p>where $orig_fmt and $new_fmt are date format strings described above.</p>
<p>
</p>
<h2><a name="getting_the_gm_offset_">Getting the GM offset.</a></h2>
<p>You can get the number of seconds between the system time and GM time
using:</p>
<pre>
my $time = date_gmt_offset();</pre>
<p>So if you are in Pacific time, it would return 25200 seconds (-0700 time zone).</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>Get todays date, the default format unless specified is yyyy-mm-dd.</p>
<pre>
print date_get(); 2000-12-31</pre>
<p>Get todays date in a different format:</p>
<pre>
date_set_format('%ddd% %mmm% %dd% %yyyy%');
print date_get(); Sat Dec 31 2000</pre>
<p>Get the date from 1 week ago.</p>
<pre>
# Long way
my $date1 = date_get();
my $date2 = date_sub($date1, 7);</pre>
<pre>
or</pre>
<pre>
# Can pass in unix timestamp of date we want.
my $date = date_get (time - (7 * 86400));</pre>
<p>Compare two dates.</p>
<pre>
my $halloween = '2000-10-31';
my $christmas = '2000-12-25';
if (date_is_smaller($halloween, $christmas)) {
print &quot;Halloween comes before christmas!&quot;;
}
if (date_is_greater($christmas, $halloween)) {
print &quot;Yup, christmas comes after halloween.&quot;;
}
my @dates = ($halloween, $christmas);
print &quot;Dates in order: &quot;, sort date_comp @dates;</pre>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Date.pm,v 1.75 2005/04/04 22:21:23 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,385 @@
<!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>GT::Delay - Generic delayed module loading</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#functions">FUNCTIONS</a></li>
<ul>
<li><a href="#gt__delay">GT::Delay</a></li>
</ul>
<li><a href="#caveats_and_limitations">CAVEATS and LIMITATIONS</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Delay - Generic delayed module loading</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Delay;</pre>
<pre>
my $obj = GT::Delay('GT::Foo', 'HASH', foo =&gt; &quot;bar&quot;, bar =&gt; 12);</pre>
<pre>
... # time passes without using $obj</pre>
<pre>
$obj-&gt;method();</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module provides a simple way to handle delayed module loading in a fairly
generic way. Your object will only be a very lightweight GT::Delay object
until you call a method on it, at which point the desired module will be loaded,
your object will be changed into an object of the desired type.</p>
<p>
</p>
<hr />
<h1><a name="functions">FUNCTIONS</a></h1>
<p>There is only one usable function provided by this module, GT::Delay() (not
GT::Delay::Delay as this module attempts to leave the GT::Delay namespace as
empty as possible).</p>
<p>
</p>
<h2><a name="gt__delay">GT::Delay</a></h2>
<p>GT::Delay is used to create a new delayed object. It takes at least two
arguments. The first is the package to load, such as 'GT::Foo' to require
GT/Foo.pm and create a new GT::Foo object. The second is the type of blessed
data structure a 'GT::Foo' object really is. This can be one of either 'HASH',
'ARRAY', or 'SCALAR'. Any additional arguments are kept and passed in as
arguments to the <code>new()</code> method of the object when created.</p>
<p>The object type ('HASH', 'ARRAY', or 'SCALAR') is needed is to get around a
caveat of references - if $a and $b both point to the same reference, $b cannot
be changed from $a - which makes it impossible to just get a new object and
replace $_[0] with that object, because although that would change one of
either $a or $b, it wouldn't change the other and you could easily end up with
two separate objects. When a method is called, the new object is created, then
copied into the original object which is then reblessed into the desired
package. This doesn't change either $a or $b, but rather changes the reference
they point to. You have to pass the object type because the reference must be
reblessed, but the underlying data type cannot change. Unfortunately, this
approach has a few caveats of its own, listed below.</p>
<p>
</p>
<hr />
<h1><a name="caveats_and_limitations">CAVEATS and LIMITATIONS</a></h1>
<p>Modules that are created by a method other than <code>new()</code> are not supported.</p>
<p>Modules that use a namespace different from the module location are not
supported. For example, a package Foo::Bar::Blah located in Foo/Bar.pm. If
you have such a module that would benefit from delayed loading, you need to
rethink your package/filename naming scheme, or not use this module. It _is_
possible to do this with a hack such as:
<code>$INC{'Foo/Bar/Blah.pm'} = './Foo/Bar.pm';</code> - but other than for testing,
doing such a thing is strongly discouraged.</p>
<p>Objects cannot have their elements directly accessed - for example,
<code>$obj-&gt;{foo}</code>. But, since that is bad practise anyway, it isn't that much
of a limitation. That said, objects _can_ be accessed directly _after_ any
method has been called.</p>
<p>Modules that store a string or integer form of $self (GT::Config does this to
store object attributes) will not work, since the working object will not be
the same object create a new(), but rather a copy.</p>
<p>Modules with DESTROY methods that do things to references in $self (for
example, <code>delete $self-&gt;{foo}-&gt;{bar}</code> - though <code>delete
$self-E&lt;gt&gt;{foo}</code> would be safe) will most likely not work properly as the copy
is not deep - i.e. references are copied as-is.</p>
<p>Along the same lines as the previous point, the first object will be destroyed
before the first method call goes through, so modules that do things (e.g.
delete files, close filehandles, etc.) in DESTROY will most likely not work.</p>
<p>Any module that doesn't fall into any of the points above will be perfectly
well supported by this module.</p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Delay.pm,v 1.4 2004/01/13 01:35:15 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,465 @@
<!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>GT::Dumper - Convert Perl data structures into a string.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#example">EXAMPLE</a></li>
<li><a href="#methods_functions">METHODS/FUNCTIONS</a></li>
<ul>
<li><a href="#dumper">Dumper</a></li>
<li><a href="#dump">dump</a></li>
<li><a href="#dump_structure">dump_structure</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Dumper - Convert Perl data structures into a string.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Dumper;
print Dumper($complex_var);
print GT::Dumper-&gt;dump ( var =&gt; '$MYVAR', data =&gt; $complex_var);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Dumper by default exports a method <code>Dumper()</code> which will
behave similar to Data::Dumper's Dumper(). It differs in that
it will only take a single argument, and the variable dumped
will be $VAR instead of $VAR1. Also, to provide easier control
to change the variable name that gets dumped, you can use:</p>
<pre>
GT::Dumper-&gt;dump ( var =&gt; string, data =&gt; yourdata );</pre>
<p>and the dump will start with string = instead of $VAR = .</p>
<p>
</p>
<hr />
<h1><a name="example">EXAMPLE</a></h1>
<pre>
use GT::Dumper;
my %foo;
my @bar = (1, 2, 3);
$foo{alpha} = \@bar;
$foo{beta} = 'a string';
print Dumper(\%foo);</pre>
<p>This will print:</p>
<pre>
$VAR = {
'beta' =&gt; 'a string',
'alpha' =&gt; [
'1',
'2',
'3',
],
};</pre>
<p>
</p>
<hr />
<h1><a name="methods_functions">METHODS/FUNCTIONS</a></h1>
<p>
</p>
<h2><a name="dumper">Dumper</a></h2>
<p><code>Dumper()</code> is exported by default when using GT::Dumper. It takes a single
variable and returns a string representation of the variable. The string can
then be eval()'ed back into the same data structure.</p>
<p>It takes only one argument - the variable to dump. The return is a string of
the form:</p>
<p>$VAR = DATA</p>
<p>where 'DATA' is the actual data structure of the variable. A more powerful and
customizable dumping method is the <a href="#dump">dump</a> method.</p>
<p>
</p>
<h2><a name="dump">dump</a></h2>
<p><code>dump()</code> provides a more customizable method to dumping a data structure. Through
the various options available, listed below, the output of a data structure
dump can be formatted in several different ways.</p>
<p>The options are as follows. Only the <a href="#data">data</a> option is required.</p>
<ul>
<li><strong><a name="item_data">data</a></strong><br />
</li>
The data option takes a data structure to dump. It is required.
<p></p>
<li><strong><a name="item_var">var</a></strong><br />
</li>
By default, a dump is output as an assignment to <code>$VAR</code>. For example, dumping
the string <code>foo</code> would return: <code>$VAR = 'foo'</code>. You can change and even omit
the assignment using the <a href="#item_var"><code>var</code></a> option. To specify a different variable, you
simply specify it as the value here. To have 'foo' dump as just <code>'foo'</code>
instead of <code>$VAR = 'foo'</code>, specify var as an empty string, or undef.
<p></p>
<li><strong><a name="item_tab">tab</a></strong><br />
</li>
When indenting for complex data structures (array refs, hash refs, etc.) an
indent is used. By default, the indent is 4 spaces, however you can change this
by using the <a href="#item_tab"><code>tab</code></a> option.
<p></p>
<li><strong><a name="item_sort">sort</a></strong><br />
</li>
The <a href="#item_sort"><code>sort</code></a> option enables hash key sorting. It is not on by default - to
enable, simply specify the sort option with 1 as the value. The default sort
method is case-sensitive alphabetical. See the <a href="#order">order</a> option for
specifying your own sort order.
<p></p>
<li><strong><a name="item_order">order</a></strong><br />
</li>
When sorting, it is sometimes desirable to use a custom sort order rather than
the default case-sensitive alphabetical sort. The <a href="#item_order"><code>order</code></a> option takes a code
reference and enables custom sort ordering. The code reference will be passed 4
variables. The first and second are the two items being compared - $a and $b in
Perl's sort mechanism. The third and fourth are the values in the hash being
sorted. The code reference, like a Perl sort routine, should return -1 if $a
should come before $b, 0 if $a and $b are equivelant in your sort order, and 1
if $b should come before $a. Because of scoping and package issues in Perl, it
is not possible to directly use $a and $b.
<p></p>
<li><strong><a name="item_compress">compress</a></strong><br />
</li>
The default dump method is to use ' =&gt; ' between hash key and value, to use
indenting, and to add a line break after each dumped element. You can turn all
of these off by using the compress option.
<p>Compression removes all non-essential characters from the output, thus reducing
data size, however also generally making the dump very difficult to read. If
enabled, the dumping behaviour is changed as follows:</p>
<ul>
<li><strong><a name="item_assignment">assignment</a></strong><br />
</li>
If using a var (ie. <code>$VAR = DATA</code>), the spaces around the = will be stripped.
The output will look like: <code>$VAR=DATA</code>
<p></p>
<li><strong><a name="item_hash_keys">hash keys</a></strong><br />
</li>
Instead of placing the 4 characters ' =&gt; ' between hash keys and values, a
single ',' will be used.
<p></p>
<li><strong><a name="item_tabs">tabs</a></strong><br />
</li>
Tabs will not be used.
<p></p>
<li><strong><a name="item_newlines">newlines</a></strong><br />
</li>
Normally, a newline character is added after each dumped element. Compress
turns this off.
<p></p></ul>
<li><strong><a name="item_structure">structure</a></strong><br />
</li>
The structure option causes the dump to be a valid perl structure rather than a
valid perl statement. This differs in two ways - for one, the <a href="#item_var"><code>var</code></a> option is
ignored - it is treated as if a blank <a href="#item_var"><code>var</code></a> was entered, thereby not returning
an assignment. The other difference is that an an ordinary dump adds a
semicolon and newline at the end of the dump, but these are not added when the
structure option is enabled.
<p></p></ul>
<p>
</p>
<h2><a name="dump_structure">dump_structure</a></h2>
<p>This is a quick method to do a structure dump. It takes one argument - the data
to dump. Calling:
$class-&gt;dump_structure($DATA);
is identical to calling:
$class-&gt;dump(data =&gt; $DATA, structure =&gt; 1);
See the <a href="#structure">structure</a> option.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/Data/Dumper.html">the Data::Dumper manpage</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Dumper.pm,v 1.38 2005/02/18 04:44:33 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,667 @@
<!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>Algorithm::Diff - Compute `intelligent' differences between two files / lists</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#introduction">INTRODUCTION</a></li>
<li><a href="#usage">USAGE</a></li>
<ul>
<li><a href="#lcs"><code>LCS</code></a></li>
<li><a href="#diff"><code>diff</code></a></li>
<li><a href="#sdiff"><code>sdiff</code></a></li>
<li><a href="#traverse_sequences"><code>traverse_sequences</code></a></li>
<li><a href="#traverse_balanced"><code>traverse_balanced</code></a></li>
</ul>
<li><a href="#key_generation_functions">KEY GENERATION FUNCTIONS</a></li>
<li><a href="#author">AUTHOR</a></li>
<li><a href="#license">LICENSE</a></li>
<li><a href="#credits">CREDITS</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Algorithm::Diff - Compute `intelligent' differences between two files / lists</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::File::Diff qw(diff sdiff LCS traverse_sequences
traverse_balanced);</pre>
<pre>
@lcs = LCS( \@seq1, \@seq2 );</pre>
<pre>
@lcs = LCS( \@seq1, \@seq2, $key_generation_function );</pre>
<pre>
$lcsref = LCS( \@seq1, \@seq2 );</pre>
<pre>
$lcsref = LCS( \@seq1, \@seq2, $key_generation_function );</pre>
<pre>
@diffs = diff( \@seq1, \@seq2 );</pre>
<pre>
@diffs = diff( \@seq1, \@seq2, $key_generation_function );</pre>
<pre>
@sdiffs = sdiff( \@seq1, \@seq2 );</pre>
<pre>
@sdiffs = sdiff( \@seq1, \@seq2, $key_generation_function );
traverse_sequences( \@seq1, \@seq2,
{ MATCH =&gt; $callback,
DISCARD_A =&gt; $callback,
DISCARD_B =&gt; $callback,
} );</pre>
<pre>
traverse_sequences( \@seq1, \@seq2,
{ MATCH =&gt; $callback,
DISCARD_A =&gt; $callback,
DISCARD_B =&gt; $callback,
},
$key_generation_function );</pre>
<pre>
traverse_balanced( \@seq1, \@seq2,
{ MATCH =&gt; $callback,
DISCARD_A =&gt; $callback,
DISCARD_B =&gt; $callback,
CHANGE =&gt; $callback,
} );</pre>
<p>
</p>
<hr />
<h1><a name="introduction">INTRODUCTION</a></h1>
<p>(by Mark-Jason Dominus)</p>
<p>I once read an article written by the authors of <code>diff</code>; they said
that they hard worked very hard on the algorithm until they found the
right one.</p>
<p>I think what they ended up using (and I hope someone will correct me,
because I am not very confident about this) was the `longest common
subsequence' method. in the LCS problem, you have two sequences of
items:</p>
<pre>
a b c d f g h j q z</pre>
<pre>
a b c d e f g i j k r x y z</pre>
<p>and you want to find the longest sequence of items that is present in
both original sequences in the same order. That is, you want to find
a new sequence <em>S</em> which can be obtained from the first sequence by
deleting some items, and from the secend sequence by deleting other
items. You also want <em>S</em> to be as long as possible. In this case
<em>S</em> is</p>
<pre>
a b c d f g j z</pre>
<p>From there it's only a small step to get diff-like output:</p>
<pre>
e h i k q r x y
+ - + + - + + +</pre>
<p>This module solves the LCS problem. It also includes a canned
function to generate <code>diff</code>-like output.</p>
<p>It might seem from the example above that the LCS of two sequences is
always pretty obvious, but that's not always the case, especially when
the two sequences have many repeated elements. For example, consider</p>
<pre>
a x b y c z p d q
a b c a x b y c z</pre>
<p>A naive approach might start by matching up the <code>a</code> and <code>b</code> that
appear at the beginning of each sequence, like this:</p>
<pre>
a x b y c z p d q
a b c a b y c z</pre>
<p>This finds the common subsequence <code>a b c z</code>. But actually, the LCS
is <code>a x b y c z</code>:</p>
<pre>
a x b y c z p d q
a b c a x b y c z</pre>
<p>
</p>
<hr />
<h1><a name="usage">USAGE</a></h1>
<p>This module provides three exportable functions, which we'll deal with in
ascending order of difficulty: <code>LCS</code>,
<code>diff</code>, <code>sdiff</code>, <code>traverse_sequences</code>, and <code>traverse_balanced</code>.</p>
<p>
</p>
<h2><a name="lcs"><code>LCS</code></a></h2>
<p>Given references to two lists of items, LCS returns an array containing their
longest common subsequence. In scalar context, it returns a reference to
such a list.</p>
<pre>
@lcs = LCS( \@seq1, \@seq2 );
$lcsref = LCS( \@seq1, \@seq2 );</pre>
<p><code>LCS</code> may be passed an optional third parameter; this is a CODE
reference to a key generation function. See <a href="#key_generation_functions">KEY GENERATION FUNCTIONS</a>.</p>
<pre>
@lcs = LCS( \@seq1, \@seq2, $keyGen );
$lcsref = LCS( \@seq1, \@seq2, $keyGen );</pre>
<p>Additional parameters, if any, will be passed to the key generation
routine.</p>
<p>
</p>
<h2><a name="diff"><code>diff</code></a></h2>
<pre>
@diffs = diff( \@seq1, \@seq2 );
$diffs_ref = diff( \@seq1, \@seq2 );</pre>
<p><code>diff</code> computes the smallest set of additions and deletions necessary
to turn the first sequence into the second, and returns a description
of these changes. The description is a list of <em>hunks</em>; each hunk
represents a contiguous section of items which should be added,
deleted, or replaced. The return value of <code>diff</code> is a list of
hunks, or, in scalar context, a reference to such a list.</p>
<p>Here is an example: The diff of the following two sequences:</p>
<pre>
a b c e h j l m n p
b c d e f j k l m r s t</pre>
<p>Result:</p>
<pre>
[
[ [ '-', 0, 'a' ] ],</pre>
<pre>
[ [ '+', 2, 'd' ] ],</pre>
<pre>
[ [ '-', 4, 'h' ] ,
[ '+', 4, 'f' ] ],</pre>
<pre>
[ [ '+', 6, 'k' ] ],</pre>
<pre>
[ [ '-', 8, 'n' ],
[ '-', 9, 'p' ],
[ '+', 9, 'r' ],
[ '+', 10, 's' ],
[ '+', 11, 't' ],
]
]</pre>
<p>There are five hunks here. The first hunk says that the <code>a</code> at
position 0 of the first sequence should be deleted (<code>-</code>). The second
hunk says that the <code>d</code> at position 2 of the second sequence should
be inserted (<code>+</code>). The third hunk says that the <code>h</code> at position 4
of the first sequence should be removed and replaced with the <code>f</code>
from position 4 of the second sequence. The other two hunks similarly.</p>
<p><code>diff</code> may be passed an optional third parameter; this is a CODE
reference to a key generation function. See <a href="#key_generation_functions">KEY GENERATION FUNCTIONS</a>.</p>
<p>Additional parameters, if any, will be passed to the key generation
routine.</p>
<p>
</p>
<h2><a name="sdiff"><code>sdiff</code></a></h2>
<pre>
@sdiffs = sdiff( \@seq1, \@seq2 );
$sdiffs_ref = sdiff( \@seq1, \@seq2 );</pre>
<p><code>sdiff</code> computes all necessary components to show two sequences
and their minimized differences side by side, just like the
Unix-utility <em>sdiff</em> does:</p>
<pre>
same same
before | after
old &lt; -
- &gt; new</pre>
<p>It returns a list of array refs, each pointing to an array of
display instructions. In scalar context it returns a reference
to such a list.</p>
<p>Display instructions consist of three elements: A modifier indicator
(<code>+</code>: Element added, <code>-</code>: Element removed, <code>u</code>: Element unmodified,
<code>c</code>: Element changed) and the value of the old and new elements, to
be displayed side by side.</p>
<p>An <code>sdiff</code> of the following two sequences:</p>
<pre>
a b c e h j l m n p
b c d e f j k l m r s t</pre>
<p>results in</p>
<p>[ [ '-', 'a', '' ],
[ 'u', 'b', 'b' ],
[ 'u', 'c', 'c' ],
[ '+', '', 'd' ],
[ 'u', 'e', 'e' ],
[ 'c', 'h', 'f' ],
[ 'u', 'j', 'j' ],
[ '+', '', 'k' ],
[ 'u', 'l', 'l' ],
[ 'u', 'm', 'm' ],
[ 'c', 'n', 'r' ],
[ 'c', 'p', 's' ],
[ '+', '', 't' ] ]</p>
<p><code>sdiff</code> may be passed an optional third parameter; this is a CODE
reference to a key generation function. See <a href="#key_generation_functions">KEY GENERATION FUNCTIONS</a>.</p>
<p>Additional parameters, if any, will be passed to the key generation
routine.</p>
<p>
</p>
<h2><a name="traverse_sequences"><code>traverse_sequences</code></a></h2>
<p><code>traverse_sequences</code> is the most general facility provided by this
module; <code>diff</code> and <code>LCS</code> are implemented as calls to it.</p>
<p>Imagine that there are two arrows. Arrow A points to an element of sequence A,
and arrow B points to an element of the sequence B. Initially, the arrows
point to the first elements of the respective sequences. <code>traverse_sequences</code>
will advance the arrows through the sequences one element at a time, calling an
appropriate user-specified callback function before each advance. It
willadvance the arrows in such a way that if there are equal elements <code>$A[$i]</code>
and <code>$B[$j]</code> which are equal and which are part of the LCS, there will be
some moment during the execution of <code>traverse_sequences</code> when arrow A is
pointing to <code>$A[$i]</code> and arrow B is pointing to <code>$B[$j]</code>. When this happens,
<code>traverse_sequences</code> will call the <code>MATCH</code> callback function and then it will
advance both arrows.</p>
<p>Otherwise, one of the arrows is pointing to an element of its sequence that is
not part of the LCS. <code>traverse_sequences</code> will advance that arrow and will
call the <code>DISCARD_A</code> or the <code>DISCARD_B</code> callback, depending on which arrow it
advanced. If both arrows point to elements that are not part of the LCS, then
<code>traverse_sequences</code> will advance one of them and call the appropriate
callback, but it is not specified which it will call.</p>
<p>The arguments to <code>traverse_sequences</code> are the two sequences to traverse, and a
hash which specifies the callback functions, like this:</p>
<pre>
traverse_sequences( \@seq1, \@seq2,
{ MATCH =&gt; $callback_1,
DISCARD_A =&gt; $callback_2,
DISCARD_B =&gt; $callback_3,
} );</pre>
<p>Callbacks for MATCH, DISCARD_A, and DISCARD_B are invoked with at least the
indices of the two arrows as their arguments. They are not expected to return
any values. If a callback is omitted from the table, it is not called.</p>
<p>Callbacks for A_FINISHED and B_FINISHED are invoked with at least the
corresponding index in A or B.</p>
<p>If arrow A reaches the end of its sequence, before arrow B does,
<code>traverse_sequences</code> will call the <code>A_FINISHED</code> callback when it advances
arrow B, if there is such a function; if not it will call <code>DISCARD_B</code> instead.
Similarly if arrow B finishes first. <code>traverse_sequences</code> returns when both
arrows are at the ends of their respective sequences. It returns true on
success and false on failure. At present there is no way to fail.</p>
<p><code>traverse_sequences</code> may be passed an optional fourth parameter; this is a
CODE reference to a key generation function. See <a href="#key_generation_functions">KEY GENERATION FUNCTIONS</a>.</p>
<p>Additional parameters, if any, will be passed to the key generation function.</p>
<p>
</p>
<h2><a name="traverse_balanced"><code>traverse_balanced</code></a></h2>
<p><code>traverse_balanced</code> is an alternative to <code>traverse_sequences</code>. It
uses a different algorithm to iterate through the entries in the
computed LCS. Instead of sticking to one side and showing element changes
as insertions and deletions only, it will jump back and forth between
the two sequences and report <em>changes</em> occurring as deletions on one
side followed immediatly by an insertion on the other side.</p>
<p>In addition to the
<code>DISCARD_A</code>,
<code>DISCARD_B</code>, and
<code>MATCH</code>
callbacks supported by <code>traverse_sequences</code>, <code>traverse_balanced</code> supports
a <code>CHANGE</code> callback indicating that one element got <code>replaced</code> by another:</p>
<pre>
traverse_sequences( \@seq1, \@seq2,
{ MATCH =&gt; $callback_1,
DISCARD_A =&gt; $callback_2,
DISCARD_B =&gt; $callback_3,
CHANGE =&gt; $callback_4,
} );</pre>
<p>If no <code>CHANGE</code> callback is specified, <code>traverse_balanced</code>
will map <code>CHANGE</code> events to <code>DISCARD_A</code> and <code>DISCARD_B</code> actions,
therefore resulting in a similar behaviour as <code>traverse_sequences</code>
with different order of events.</p>
<p><code>traverse_balanced</code> might be a bit slower than <code>traverse_sequences</code>,
noticable only while processing huge amounts of data.</p>
<p>The <code>sdiff</code> function of this module
is implemented as call to <code>traverse_balanced</code>.</p>
<p>
</p>
<hr />
<h1><a name="key_generation_functions">KEY GENERATION FUNCTIONS</a></h1>
<p><code>diff</code>, <code>LCS</code>, and <code>traverse_sequences</code> accept an optional last parameter.
This is a CODE reference to a key generating (hashing) function that should
return a string that uniquely identifies a given element. It should be the
case that if two elements are to be considered equal, their keys should be the
same (and the other way around). If no key generation function is provided,
the key will be the element as a string.</p>
<p>By default, comparisons will use ``eq'' and elements will be turned into keys
using the default stringizing operator '``'''.</p>
<p>Where this is important is when you're comparing something other than strings.
If it is the case that you have multiple different objects that should be
considered to be equal, you should supply a key generation function. Otherwise,
you have to make sure that your arrays contain unique references.</p>
<p>For instance, consider this example:</p>
<pre>
package Person;</pre>
<pre>
sub new
{
my $package = shift;
return bless { name =&gt; '', ssn =&gt; '', @_ }, $package;
}</pre>
<pre>
sub clone
{
my $old = shift;
my $new = bless { %$old }, ref($old);
}</pre>
<pre>
sub hash
{
return shift()-&gt;{'ssn'};
}</pre>
<pre>
my $person1 = Person-&gt;new( name =&gt; 'Joe', ssn =&gt; '123-45-6789' );
my $person2 = Person-&gt;new( name =&gt; 'Mary', ssn =&gt; '123-47-0000' );
my $person3 = Person-&gt;new( name =&gt; 'Pete', ssn =&gt; '999-45-2222' );
my $person4 = Person-&gt;new( name =&gt; 'Peggy', ssn =&gt; '123-45-9999' );
my $person5 = Person-&gt;new( name =&gt; 'Frank', ssn =&gt; '000-45-9999' );</pre>
<p>If you did this:</p>
<pre>
my $array1 = [ $person1, $person2, $person4 ];
my $array2 = [ $person1, $person3, $person4, $person5 ];
GT::File::Diff::diff( $array1, $array2 );</pre>
<p>everything would work out OK (each of the objects would be converted
into a string like ``Person=HASH(0x82425b0)'' for comparison).</p>
<p>But if you did this:</p>
<pre>
my $array1 = [ $person1, $person2, $person4 ];
my $array2 = [ $person1, $person3, $person4-&gt;clone(), $person5 ];
GT::File::Diff::diff( $array1, $array2 );</pre>
<p>$person4 and $person4-&gt;<code>clone()</code> (which have the same name and SSN)
would be seen as different objects. If you wanted them to be considered
equivalent, you would have to pass in a key generation function:</p>
<pre>
my $array1 = [ $person1, $person2, $person4 ];
my $array2 = [ $person1, $person3, $person4-&gt;clone(), $person5 ];
GT::File::Diff::diff( $array1, $array2, \&amp;Person::hash );</pre>
<p>This would use the 'ssn' field in each Person as a comparison key, and
so would consider $person4 and $person4-&gt;<code>clone()</code> as equal.</p>
<p>You may also pass additional parameters to the key generation function
if you wish.</p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>This version by Ned Konz, <a href="mailto:perl@bike-nomad.com">perl@bike-nomad.com</a></p>
<p>
</p>
<hr />
<h1><a name="license">LICENSE</a></h1>
<p>Copyright (c) 2000-2002 Ned Konz. All rights reserved.
This program is free software;
you can redistribute it and/or modify it under the same terms
as Perl itself.</p>
<p>
</p>
<hr />
<h1><a name="credits">CREDITS</a></h1>
<p>Versions through 0.59 (and much of this documentation) were written by:</p>
<p>Mark-Jason Dominus, <a href="mailto:mjd-perl-diff@plover.com">mjd-perl-diff@plover.com</a></p>
<p>This version borrows the documentation and names of the routines
from Mark-Jason's, but has all new code in Diff.pm.</p>
<p>This code was adapted from the Smalltalk code of
Mario Wolczko &lt;<a href="mailto:mario@wolczko.com">mario@wolczko.com</a>&gt;, which is available at
<a href="ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st">ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st</a></p>
<p><code>sdiff</code> and <code>traverse_balanced</code> were written by Mike Schilli
&lt;<a href="mailto:m@perlmeister.com">m@perlmeister.com</a>&gt;.</p>
<p>The algorithm is that described in
<em>A Fast Algorithm for Computing Longest Common Subsequences</em>,
CACM, vol.20, no.5, pp.350-353, May 1977, with a few
minor improvements to improve the speed.</p>
</body>
</html>

View File

@ -0,0 +1,580 @@
<!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>GT::File::Tools - Export tools for dealing with files</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#functions">FUNCTIONS</a></li>
<ul>
<li><a href="#find">find</a></li>
<li><a href="#move">move</a></li>
<li><a href="#del">del</a></li>
<li><a href="#deldir">deldir</a></li>
<li><a href="#copy">copy</a></li>
<li><a href="#mkpath">mkpath</a></li>
<li><a href="#parsefile">parsefile</a></li>
<li><a href="#dirname">dirname</a></li>
<li><a href="#basename">basename</a></li>
<li><a href="#expand">expand</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::File::Tools - Export tools for dealing with files</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::File::Tools qw/:all/;
# Find all files in a users home directory.
find &quot;/home/user&quot;, sub { print shift };
# Rename a file1 to file2.
move &quot;file1&quot;, &quot;file2&quot;;</pre>
<pre>
# Remove a list of files.
del @files;</pre>
<pre>
# Remove a users home directory
deldir &quot;/home/foo&quot;;</pre>
<pre>
# Copy a file
copy &quot;file1&quot;, &quot;file2&quot;;</pre>
<pre>
# Recursively copy a directory.
copy &quot;/home/user&quot;, &quot;/home/user.bak&quot;;</pre>
<pre>
# Recursively make a directory.
mkpath &quot;/home/user/www/cgi-bin&quot;, 0755;</pre>
<pre>
# Parse a filename into directory, file and is_relative components
my ($dir, $file, $is_rel) = parsefile(&quot;/home/foo/file.txt&quot;);</pre>
<pre>
# Get the file portion of a filename
my $file = basename(&quot;/home/foo/file.txt&quot;);</pre>
<pre>
# Get the directory portion of a filename.
my $dir = dirname(&quot;/home/foo/file.txt&quot;);</pre>
<pre>
# Use shell like expansion to get a list of absolute files.
my @src = expand(&quot;*.c&quot;, &quot;*.h&quot;);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::File::Tools is designed to export requested functions into your namespace.
These function perform various file operations.</p>
<p>
</p>
<hr />
<h1><a name="functions">FUNCTIONS</a></h1>
<p>GT::File::Tools exports functions to your namespace. Here is a list of the
functions you can request to be exported.</p>
<p>
</p>
<h2><a name="find">find</a></h2>
<p><code>find</code> takes three parameters: directory to search in, callback to run for
each file and/or directory found, and a hash ref of options. <strong>Note</strong>: this is
the opposite order of File::Find's <code>find()</code> function! The following options
can be passed set:</p>
<dl>
<dt><strong><a name="item_globbing">globbing</a></strong><br />
</dt>
<dd>
Expand filenames in the same way as the unix shell:
</dd>
<dd>
<pre>
find(&quot;/home/a*&quot;, sub { print shift; }, { globbing =&gt; 1 });</pre>
</dd>
<dd>
<p>would fine all home directories starting with the letter a. This option is
off by default.</p>
</dd>
<p></p>
<dt><strong><a name="item_error_handler">error_handler</a></strong><br />
</dt>
<dd>
A code ref that is run whenever find encounters an error. If the callback
returns 0, find will stop immediately, otherwise find will continue
searching (default).
</dd>
<p></p>
<dt><strong><a name="item_no_chdir">no_chdir</a></strong><br />
</dt>
<dd>
By default, find will chdir into the directories it is searching as
this results in a dramatic performance improvement. Upon completion, find
will chdir back to the original directory. This behavior is on by default.
</dd>
<p></p>
<dt><strong><a name="item_dirs_first">dirs_first</a></strong><br />
</dt>
<dd>
This option controls the order find traverses. It defaults on, and means
find will go down directories first before looking at files. This is
essential for recursively deleting a directory.
</dd>
<p></p>
<dt><strong><a name="item_files_only">files_only</a></strong><br />
</dt>
<dd>
This option tells find to run the callback only for each file found
and not for each directory. Off by default.
</dd>
<p></p>
<dt><strong><a name="item_dirs_only">dirs_only</a></strong><br />
</dt>
<dd>
This option tells find to run the callback only for each directory found
and not for each file. Off by default.
</dd>
<p></p>
<dt><strong><a name="item_max_depth">max_depth</a></strong><br />
</dt>
<dd>
Defaults to 1000, this option controls how deep a directory structure find
will traverse. Meant mainly as a safety, and should not need to be adjusted.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="move">move</a></h2>
<p><code>move</code> has the same syntax as the system mv command:</p>
<pre>
move 'file', 'file2';
move 'file1', 'file2', 'dir';
move 'file1', 'file2', 'dir3', 'dir';
move '*.c', 'dir', { globbing =&gt; 1 };</pre>
<p>The only difference is the last argument can be a hash ref of options. The
following options are allowed:</p>
<dl>
<dt><strong>globbing</strong><br />
</dt>
<dt><strong>error_handler</strong><br />
</dt>
<dt><strong>max_depth</strong><br />
</dt>
</dl>
<p>
</p>
<h2><a name="del">del</a></h2>
<p><code>del</code> has the same syntax as the rm system command, but it can not remove
directories. Use <code>deldir</code> below to recursively remove files.</p>
<pre>
del 'file1';
del '*.c', { globbing =&gt; 1 };
del 'a', 'b', 'c';</pre>
<p>It takes a list of files or directories to delete, and an optional hash ref
of options. The following options are allowed:</p>
<dl>
<dt><strong>error_handler</strong><br />
</dt>
<dt><strong>globbing</strong><br />
</dt>
</dl>
<p>
</p>
<h2><a name="deldir">deldir</a></h2>
<p><code>deldir</code> is similiar to <code>del</code>, but allows recursive deletes of directories:</p>
<pre>
deldir 'file1';
deldir 'dir11', 'dir2', 'dir3';
deldir '/home/a*', { globbing =&gt; 1 };</pre>
<p>It takes a list of files and/or directories to remove, and an optional hash ref
of options. The following options are allowed:</p>
<dl>
<dt><strong>error_handler</strong><br />
</dt>
<dt><strong>globbing</strong><br />
</dt>
<dt><strong>max_depth</strong><br />
</dt>
</dl>
<p>
</p>
<h2><a name="copy">copy</a></h2>
<p><code>copy</code> is similiar to the system cp command:</p>
<pre>
copy 'file1', 'file2';
copy 'file1', 'file2', 'file3', 'dir1';
copy '*.c', '/usr/local/src', { globbing =&gt; 1 };
copy</pre>
<p>It copies a source file to a destination file or directory. You can also
specify multiple source files, and copy them into a single directory. The
last argument should be a hash ref of options:</p>
<dl>
<dt><strong><a name="item_set_perms">set_perms</a></strong><br />
</dt>
<dd>
This option will preserve permissions. i.e.: if the original file is set 755,
the copy will also be set 755. It defaults on.
</dd>
<p></p>
<dt><strong><a name="item_set_owner">set_owner</a></strong><br />
</dt>
<dd>
This option will preserver file ownership. Note: you must be root to be able
to change ownerhsip of a file. This defaults off.
</dd>
<p></p>
<dt><strong><a name="item_set_time">set_time</a></strong><br />
</dt>
<dd>
This option will preserve file modification time.
</dd>
<p></p>
<dt><strong><a name="item_preserve_all">preserve_all</a></strong><br />
</dt>
<dd>
This option sets set_perms, set_owner and set_time on.
</dd>
<p></p>
<dt><strong>error_handler</strong><br />
</dt>
<dt><strong>globbing</strong><br />
</dt>
<dt><strong>max_depth</strong><br />
</dt>
</dl>
<p>
</p>
<h2><a name="mkpath">mkpath</a></h2>
<p><code>mkpath</code> recursively makes a directory. It takes the same arguments as
perl's mkdir():</p>
<pre>
mkpath(&quot;/home/alex/create/these/dirs&quot;, 0755) or die &quot;Can't mkpath: $!&quot;;</pre>
<p>For compatibility with older module versions, <code>rmkdir()</code> is an alias for
mkpath().</p>
<p>
</p>
<h2><a name="parsefile">parsefile</a></h2>
<p>This function takes any type of filename (relative, fullpath, etc) and
returns the inputs directory, file, and whether it is a relative path or
not. For example:</p>
<pre>
my ($directory, $file, $is_relative) = parsefile(&quot;../foo/bar.txt&quot;);</pre>
<p>
</p>
<h2><a name="dirname">dirname</a></h2>
<p>Returns the directory portion of a filename.</p>
<p>
</p>
<h2><a name="basename">basename</a></h2>
<p>Returns the last portion of a filename (typically, the filename itself without
any leading directory). A deprecated <code>filename()</code> alias for <code>basename()</code> also
exists.</p>
<p>
</p>
<h2><a name="expand">expand</a></h2>
<p>Uses shell like expansion to expand a list of filenames to full paths. For
example:</p>
<pre>
my @source = expand(&quot;*.c&quot;, &quot;*.h&quot;);
my @homedirs = expand(&quot;/home/*&quot;);</pre>
<p>If you pass in relative paths, expand always returns absolute paths of
expanded files. <strong>Note</strong>: this does not actually go to the shell.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>This module depends on perl's Cwd module for getting the current working
directory. It also uses GT::AutoLoader to load on demand functions.</p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Scott Beck</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Tools.pm,v 1.61 2005/05/13 01:48:23 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/FileMan.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/FileMan/Commands.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/FileMan/Diff.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,713 @@
<!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>GT::Installer - Performs initial installs for GTI products</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#creating_a_new_gt__installer_object">Creating a new GT::Installer object</a></li>
<li><a href="#add_config__adding_configuration_options_">add_config - Adding configuration options.</a></li>
<li><a href="#add_config_message__add_a_configuration_message_">add_config_message - Add a configuration message.</a></li>
<li><a href="#install_exit_message__add_an_exit_message_for_installs_">install_exit_message - Add an exit message for installs.</a></li>
<li><a href="#install_to__specify_where_to_untar_files_to_">install_to - Specify where to untar files to.</a></li>
<li><a href="#use_lib__set_the_use_lib_path_for_addition_to_all__pl_and__cgi_files_">use_lib - Set the use lib path for addition to all .pl and .cgi files.</a></li>
<li><a href="#replace_path__generic_method_to_replace_paths_upon_install">replace_path - Generic method to replace paths upon install</a></li>
<li><a href="#add_upgrade__adding_upgrade_options_">add_upgrade - Adding upgrade options.</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Installer - Performs initial installs for GTI products</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
main();</pre>
<pre>
sub main {
my $format = 'scroll1';
my $installer = GT::Installer-&gt;new(
product =&gt; 'Gossamer Mail',
version =&gt; '2.0.0 beta 1',
load_defaults =&gt; \&amp;load_defaults,
load_config =&gt; \&amp;load_config,
save_config =&gt; \&amp;save_config,
checksums =&gt; &quot;&lt;%Data Path%&gt;/admin/checksums&quot;,
welcome_format =&gt; $format
);</pre>
<pre>
$installer-&gt;add_config_message(q|
This should be the system path and url (start with <a href="http://">http://</a>)
to the directory where your admin files are. No trailing
slash please.|, $format);</pre>
<pre>
$installer-&gt;add_config(
type =&gt; 'path',
key =&gt; &quot;Admin Path&quot;,
message =&gt; 'Admin Path',
);
}
# Regex to path keys. These regexs have to capture
# the file in $1
$installer-&gt;install_to(
'^admin/(.*)$' =&gt; 'Admin Path',
'^user/(.*)$' =&gt; 'User Path',
'^batch/(.*)$' =&gt; 'Batch Path',
'^data/(.*)$' =&gt; 'Data Path',
'^images/(.*)$' =&gt; 'Images Path',
);
$installer-&gt;add_upgrade(
message =&gt; 'Program Files. e.g. .pm, .pl and .cgi files',
file_list =&gt; '\.(?:pl|cgi|pm)$'
);
$installer-&gt;add_upgrade(skip =&gt; 'ConfigData\.pm$');
$installer-&gt;perform;
}</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Installer is an installer class for all Gossamer Threads
products. It will handle both a command line interface and a
CGI inteface.</p>
<p>All intallation directives are specified at the start and are
called for each CGI request if being ran in CGI mode.</p>
<p>
</p>
<h2><a name="creating_a_new_gt__installer_object">Creating a new GT::Installer object</a></h2>
<p>There are several options when creating a new GT::Installer
object. All options are in the form of key value pairs. The
options can be passed in as a flattened hash or as a hash
reference.</p>
<p>There are two options that must be specified. These are
<em>product</em> and <em>version</em>. All other options are optional.</p>
<p>There are two ways to get a GT::SQL object. First, you can simply
provide the path to the def file directory where GT::SQL stores all
it's information:</p>
<pre>
$db = new GT::SQL '/path/to/def';</pre>
<p>or you can pass in a hash or hash ref and specify options:</p>
<pre>
$db = new GT::SQL {
def_path =&gt; '/path/to/def',
cache =&gt; 1,
debug =&gt; 1,
subclass =&gt; 1
);</pre>
<p>You must specify def_path. Setting cache =&gt; 1, will result in
all table or relation objects to be cached which can improve
performance.</p>
<p>Setting subclass =&gt; 0 or subclass =&gt; 1 will enable or disable
the ability to subclass any of the objects GT::SQL creates. The
default behaviour is 1.</p>
<p>GT::SQL has advanced debugging, and setting it to 1 should be
adequate for most operations.</p>
<dl>
<dt><strong><a name="item_product">product</a></strong><br />
</dt>
<dd>
Specifies the name of the product. This name is used in the
welcome message and in various parts of the dialogue.
</dd>
<dd>
<pre>
product =&gt; 'Gossamer Mail'</pre>
</dd>
<p></p>
<dt><strong><a name="item_version">version</a></strong><br />
</dt>
<dd>
This is the version of the product. It is used on the startup
screen to tell the user what version we are installing or
upgrading to.
</dd>
<dd>
<pre>
version =&gt; '2.0.0 beta 1'</pre>
</dd>
<p></p>
<dt><strong><a name="item_load_defaults">load_defaults</a></strong><br />
</dt>
<dd>
This is a code reference that is called when installing. It
is used to defaults for prompts you have set up. The only
argument to this code reference if the installer object
which has method to assist in setting up defaults for the
different configuration options that you would specify.
</dd>
<dd>
<p>If you return false from this code reference the error is
expected to be in GT::Installer::error. GT::Installer inherets
from GT::Base so you can just call the <em>error</em> method on the
object and return it to achieve this.</p>
</dd>
<dd>
<pre>
load_defaults =&gt; \&amp;load_defaults</pre>
</dd>
<p></p>
<dt><strong><a name="item_load_config">load_config</a></strong><br />
</dt>
<dd>
This is another code reference. It is called when the user
specifies that they are doing an upgrade. The argument to
this callback is the installer object. The path to the admin
directory of the last install is a key in the installer object
<em>admin_path</em>. In this code reference you will need to correlate
all the config option keys to the values in your config file.
See the example included in this pod for a possible why to
do this.
</dd>
<dd>
<pre>
load_config =&gt; \&amp;load_config</pre>
</dd>
<dd>
<p>If you return false from this code reference the error is
expected to be in GT::Installer::error. GT::Installer inherets
from GT::Base so you can just call the <em>error</em> method on the
object and return it to achieve this.</p>
</dd>
<p></p>
<dt><strong><a name="item_save_config">save_config</a></strong><br />
</dt>
<dd>
This is a code reference that is called after an install or
upgrade. It gives you the opertunity to save any user input into
there new/old config file.
</dd>
<dd>
<pre>
save_config =&gt; \&amp;save_config</pre>
</dd>
<p></p>
<dt><strong><a name="item_checksums">checksums</a></strong><br />
</dt>
<dd>
This should be set to the full system path to the checksum file.
If this is not set checksums will not be used, which makes
the upgrade questions usless and all files will be overridden.
There is no possible way you can know the full path to this file
at the point you set it. You can specify tags in this path
that will get replaced with what the user entered. The tags
are similar to <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template.html">the GT::Template manpage</a> tags in that they start with
<em>&amp;lt;%</em> and end with <em>%&amp;gt;</em>. No other <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template.html">the GT::Template manpage</a> tags conventions
are used.
</dd>
<dd>
<pre>
checksums =&gt; &quot;&lt;%Data Path%&gt;/admin/checksums&quot;</pre>
</dd>
<p></p>
<dt><strong><a name="item_welcome_format">welcome_format</a></strong><br />
</dt>
<dd>
This is the welcome format. There are named formats that are
used in GT::Installer for most command line output. This
is the one that is used for the initial message. This is not
used in CGI mode.
</dd>
<dd>
<p>There are currently 4 formats (more to come :)). There are:</p>
</dd>
<dl>
<dt><strong><a name="item_scroll1">scroll1</a></strong><br />
</dt>
<dd>
<pre>
_________________________________________________________________
/\ \
\_| |
| |
| This is the scroll1 format |
| ______________________________________________________________|_
\_/_______________________________________________________________/</pre>
</dd>
<dt><strong><a name="item_scroll2">scroll2</a></strong><br />
</dt>
<dd>
<pre>
__^__ __^__
( ___ )--------------------------------------------------------------( ___ )
| / | | \ |
| / | This is the scroll2 format | \ |
|___| |___|
(_____)--------------------------------------------------------------(_____)</pre>
</dd>
<dt><strong><a name="item_professional">professional</a></strong><br />
</dt>
<dd>
<pre>
#================================================================#
= =
= This is the professional format =
#================================================================#</pre>
</dd>
<dt><strong><a name="item_none">none</a></strong><br />
</dt>
<dd>
This format just performs line wraps. Has no outline :(
</dd>
<p></p></dl>
</dl>
<p>
</p>
<h2><a name="add_config__adding_configuration_options_">add_config - Adding configuration options.</a></h2>
<p>There are 3 methods for adding user prompts. When I say user promts I
mean that in the telnet sence, in CGI mode it is just a table row.</p>
<p>This is the method you will be calling for every install option the
user should specify. This method takes it's arguments as key value
pair. The arguments can either be in the form of a flatened hash or
a hash reference.</p>
<pre>
$installer-&gt;add_config(
type =&gt; 'url',
key =&gt; &quot;Admin URL&quot;,
message =&gt; 'Admin URL',
telnet_callback =&gt; \&amp;telnet_callback,
);</pre>
<p>Each key in the hash defines an attribute of the user prompt.</p>
<dl>
<dt><strong><a name="item_type">type</a></strong><br />
</dt>
<dd>
The type attribute should be one of the built in input types. There is
currently no way to specify your own type. If this becomes a problem
it will be added. The built in types are as follows.
</dd>
<dd>
<pre>
url - User specifies a URL.
ftp - User specifies an FTP URL.
path - User specifies a Path to something on the system.
message - This is the same as calling the add_config_message
method.
create_dirs - This is a yes/no answer on weather the user wants the
directories for this install created.
email - User specifies and email address. This is commonly
used to prompt for the admin email address.
reg_number - User specifies the registration number they recieved
from us when they paid for the product.
email_support - Specify either the path to sendmail or the hostname
of an smtp server. What is specified with be in the
config hash as email_support. The key default for
this option is Mailer.
perl_path - Specify the path to perl on this system.</pre>
</dd>
<p></p>
<dt><strong><a name="item_key">key</a></strong><br />
</dt>
<dd>
Each item the user enters is stored in a hash in the installer object.
This hash is called <em>config</em>. This specifies the key used in that hash
to store this user option.
</dd>
<dd>
<p>This key is also used at the end of the telnet install to display
the options the user has specified for the install.</p>
</dd>
<dd>
<p>You will be accessing these keys in your configuration callbacks to
either set defaults or save the user specified options in your config
file. See the complete example below to see how this is used.</p>
</dd>
<p></p>
<dt><strong><a name="item_message">message</a></strong><br />
</dt>
<dd>
This is the message the user is pompted with in telnet. From the with
this appears on the left of the form the user fills out.
</dd>
<dd>
<p>This will default to the value of the <em>key</em> if not specified</p>
</dd>
<p></p>
<dt><strong><a name="item_telnet_callback">telnet_callback</a></strong><br />
</dt>
<dd>
This is a code reference that, if specified, will be ran after the user
enteres the information. You can use this to tweek the other option
defaults. If this method returns false the user will be reprompted for
the information. So you can effectivly use this to validate command
line input.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="add_config_message__add_a_configuration_message_">add_config_message - Add a configuration message.</a></h2>
<p>This is a method to add a configuration message. This message is
displayed to the user in telnet in the order you specify it. No prompt
is performed for these messages.</p>
<p>This is a shortcut function that is the same as specifing:</p>
<pre>
$installer-&gt;add_config(
type =&gt; 'message',
message =&gt; 'This message is displayed to the user',
format =&gt; 'none'
);</pre>
<p>The arguments to this function are (message, format). Message is what
is displayed, format is the format used. See above for a list of
formats.</p>
<pre>
$installer-&gt;add_config_message(q|My configuration message.|, 'professional');</pre>
<p>
</p>
<h2><a name="install_exit_message__add_an_exit_message_for_installs_">install_exit_message - Add an exit message for installs.</a></h2>
<p>This is the message that is displayed after the installation is
complete. This message uses the same convention for tags as the
<em>checksum</em> option for the constructor method. Any keys that are set
during the install will be available as tags here. The second argument
to this method is an optional format (used in telnet see above).</p>
<pre>
$installer-&gt;install_exit_message(q|
To run the setup, point your browser to:
&lt;a href=&quot;&lt;%Admin URL%&gt;/admin.cgi&quot;&gt;&lt;%Admin URL%&gt;/admin.cgi&lt;/a&gt;
|, 'scroll2');</pre>
<p>
</p>
<h2><a name="install_to__specify_where_to_untar_files_to_">install_to - Specify where to untar files to.</a></h2>
<p>The way this options is specified is a bit strange and my be rewritten.
It takes it arguments as a hash of regular expressions to keys. The
keys are the keys you specified with add_config(). The regexs are matched
against the relative path in the tar file. Anything captured in $1 is
appended to the value the user entered for that regexs key. For example
is you specify a key <em>Admin Path</em> such as</p>
<pre>
$installer-&gt;add_config(
type =&gt; 'path',
key =&gt; 'Admin Path'
);</pre>
<p>You could then use the key like:</p>
<pre>
$installer-&gt;install_to(
'^admin/(.*)' =&gt; 'Admin Path'
);</pre>
<p>This would replace admin/ in the relative path in the tar file with what
the user entered for the Admin Path prompt.</p>
<p>
</p>
<h2><a name="use_lib__set_the_use_lib_path_for_addition_to_all__pl_and__cgi_files_">use_lib - Set the use lib path for addition to all .pl and .cgi files.</a></h2>
<p>The argument to this should be a <em>key</em> specified with add_config(). The
path the user entered for that config is added to all .cgi and .pl files
in a <em>use lib ''</em> statement. Followig the example above:</p>
<pre>
$installer-&gt;use_lib('Admin Path');</pre>
<p>All .cgi and .pl file in the install will now have</p>
<pre>
use lib '/home/bline/projects/library';</pre>
<p>added to them assuming the path the user entered for that config option was
<em>/home/bline/projects/library'</em>.</p>
<p>You can set $GT::Installer::USE_LIB_SPACES to something other than the default
4 spaces to alter the number of spaces that will be put before the ``use lib''.
Please be careful - if you set this to something other than whitespace you are
asking for trouble or being an 1337 h4xx0r.</p>
<p>
</p>
<h2><a name="replace_path__generic_method_to_replace_paths_upon_install">replace_path - Generic method to replace paths upon install</a></h2>
<p>The argument should be a hash of key =&gt; value replacements that should be
made upon installation.</p>
<pre>
$installer-&gt;replace_path(
'../private/ConfigData.pm' =&gt; '&lt;%Private_Path%&gt;/ConfigData.pm'
);</pre>
<p>This will replace all occurrences of ../private/ConfigData.pm with what the
user entered in &lt;%Private_Path%&gt;.</p>
<p>
</p>
<h2><a name="add_upgrade__adding_upgrade_options_">add_upgrade - Adding upgrade options.</a></h2>
<p>This is a method for grouping files and or directories under user prompted
upgrade options. This is <em>NOT</em> designed to be a complete upgrade system. It
handled basic checksuming, overwrites and backup. This should probably not
be used for a major upgrade.</p>
<p>more to come...</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Installer.pm,v 1.93 2005/03/27 20:52:53 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,472 @@
<!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>GT::MD5 - Perl implementation of Ron Rivests MD5 Algorithm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#disclaimer">DISCLAIMER</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#limitations">LIMITATIONS</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#authors">AUTHORS</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::MD5 - Perl implementation of Ron Rivests MD5 Algorithm</p>
<p>
</p>
<hr />
<h1><a name="disclaimer">DISCLAIMER</a></h1>
<p>Majority of this module's code is borrowed from Digest::Perl::MD5 (Version 1.8).</p>
<p>This is <strong>not</strong> an interface (like <code>Digest::MD5</code>) but a Perl implementation of MD5.
It is written in perl only and because of this it is slow but it works without C-Code.
You should use <code>Digest::MD5</code> instead of this module if it is available.
This module is only usefull for</p>
<dl>
<dt></dt>
<dd>
computers where you cannot install <code>Digest::MD5</code> (e.g. lack of a C-Compiler)
</dd>
<p></p>
<dt></dt>
<dd>
encrypting only small amounts of data (less than one million bytes). I use it to
hash passwords.
</dd>
<p></p>
<dt></dt>
<dd>
educational purposes
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
# Functional style
use Digest::MD5 qw(md5 md5_hex md5_base64);</pre>
<pre>
$hash = md5 $data;
$hash = md5_hex $data;
$hash = md5_base64 $data;</pre>
<pre>
# OO style
use Digest::MD5;</pre>
<pre>
$ctx = Digest::MD5-&gt;new;</pre>
<pre>
$ctx-&gt;add($data);
$ctx-&gt;addfile(*FILE);</pre>
<pre>
$digest = $ctx-&gt;digest;
$digest = $ctx-&gt;hexdigest;
$digest = $ctx-&gt;b64digest;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This modules has the same interface as the much faster <code>Digest::MD5</code>. So you can
easily exchange them, e.g.</p>
<pre>
BEGIN {
eval {
require Digest::MD5;
import Digest::MD5 'md5_hex'
};
if ($@) { # ups, no Digest::MD5
require Digest::Perl::MD5;
import Digest::Perl::MD5 'md5_hex'
}
}</pre>
<p>If the <code>Digest::MD5</code> module is available it is used and if not you take
<code>Digest::Perl::MD5</code>.</p>
<p>You can also install the Perl part of Digest::MD5 together with Digest::Perl::MD5
and use Digest::MD5 as normal, it falls back to Digest::Perl::MD5 if it
cannot load its object files.</p>
<p>For a detailed Documentation see the <code>Digest::MD5</code> module.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>The simplest way to use this library is to import the <code>md5_hex()</code>
function (or one of its cousins):</p>
<pre>
use Digest::Perl::MD5 'md5_hex';
print 'Digest is ', md5_hex('foobarbaz'), &quot;\n&quot;;</pre>
<p>The above example would print out the message</p>
<pre>
Digest is 6df23dc03f9b54cc38a0fc1483df6e21</pre>
<p>provided that the implementation is working correctly. The same
checksum can also be calculated in OO style:</p>
<pre>
use Digest::MD5;
$md5 = Digest::MD5-&gt;new;
$md5-&gt;add('foo', 'bar');
$md5-&gt;add('baz');
$digest = $md5-&gt;hexdigest;
print &quot;Digest is $digest\n&quot;;</pre>
<p>The digest methods are destructive. That means you can only call them
once and the $md5 objects is reset after use. You can make a copy with clone:</p>
<pre>
$md5-&gt;clone-&gt;hexdigest</pre>
<p>
</p>
<hr />
<h1><a name="limitations">LIMITATIONS</a></h1>
<p>This implementation of the MD5 algorithm has some limitations:</p>
<dl>
<dt></dt>
<dd>
It's slow, very slow. I've done my very best but Digest::MD5 is still about 100 times faster.
You can only encrypt Data up to one million bytes in an acceptable time. But it's very usefull
for encrypting small amounts of data like passwords.
</dd>
<p></p>
<dt></dt>
<dd>
You can only encrypt up to 2^32 bits = 512 MB on 32bit archs. But You should
use <code>Digest::MD5</code> for those amounts of data anyway.
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/Digest/MD5.html">the Digest::MD5 manpage</a></p>
<p><em>md5(1)</em></p>
<p>RFC 1321</p>
<p>tools/md5: a small BSD compatible md5 tool written in pure perl.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.</p>
<pre>
Copyright 2000 Christian Lackas, Imperia Software Solutions
Copyright 1998-1999 Gisle Aas.
Copyright 1995-1996 Neil Winton.
Copyright 1991-1992 RSA Data Security, Inc.</pre>
<p>The MD5 algorithm is defined in RFC 1321. The basic C code
implementing the algorithm is derived from that in the RFC and is
covered by the following copyright:</p>
<dl>
<dt></dt>
<dd>
Copyright (C) 1991-1992, RSA Data Security, Inc. Created 1991. All
rights reserved.
</dd>
<dd>
<p>License to copy and use this software is granted provided that it
is identified as the ``RSA Data Security, Inc. MD5 Message-Digest
Algorithm'' in all material mentioning or referencing this software
or this function.</p>
</dd>
<dd>
<p>License is also granted to make and use derivative works provided
that such works are identified as ``derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm'' in all material
mentioning or referencing the derived work.</p>
</dd>
<dd>
<p>RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided ``as is''
without express or implied warranty of any kind.</p>
</dd>
<dd>
<p>These notices must be retained in any copies of any part of this
documentation and/or software.</p>
</dd>
<p></p></dl>
<p>This copyright does not prohibit distribution of any version of Perl
containing this extension under the terms of the GNU or Artistic
licenses.</p>
<p>
</p>
<hr />
<h1><a name="authors">AUTHORS</a></h1>
<p>The original MD5 interface was written by Neil Winton
(&lt;N.Winton (at) axion.bt.co.uk&gt;).</p>
<p><code>Digest::MD5</code> was made by Gisle Aas &lt;gisle (at) aas.no&gt; (I took his Interface
and part of the documentation).</p>
<p>Thanks to Guido Flohr for his 'use integer'-hint.</p>
<p>This release was made by Christian Lackas &lt;delta (at) lackas.net&gt;.</p>
</body>
</html>

View File

@ -0,0 +1,311 @@
<!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>unix_md5_crypt - Provides interoperable MD5-based crypt function</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>unix_md5_crypt - Provides interoperable MD5-based <code>crypt()</code> function</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::MD5::Crypt;</pre>
<pre>
$cryptedpassword = unix_md5_crypt($password, $salt);</pre>
<pre>
$valid = $cryptedpassword eq unix_md5_crypt($password, $cryptedpassword);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>the <code>unix_md5_crypt()</code> provides a crypt()-compatible interface to the
rather new MD5-based <code>crypt()</code> function found in modern operating systems.
It's based on the implementation found on FreeBSD 2.2.[56]-RELEASE and
contains the following license in it:</p>
<pre>
&quot;THE BEER-WARE LICENSE&quot; (Revision 42):
&lt;phk@login.dknet.dk&gt; wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp</pre>
<p><code>apache_md5_crypt()</code> provides a function compatible with Apache's
<code>.htpasswd</code> files. This was contributed by Bryan Hart &lt;<a href="mailto:bryan@eai.com">bryan@eai.com</a>&gt;.
As suggested by William A. Rowe, Jr. &lt;<a href="mailto:wrowe@lnd.com">wrowe@lnd.com</a>&gt;, it is
exported by default.</p>
</body>
</html>

View File

@ -0,0 +1,315 @@
<!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>GT::MIMETypes - Methods to guess MIME Types of files.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::MIMETypes - Methods to guess MIME Types of files.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::MIMETypes;</pre>
<pre>
my $file = '/foo/bar/abc.doc';
my $mime = GT::MIMETypes::guess_type($file);
my $img = GT::MIMETypes::guess_image($file);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::MIMETypes provides two simple methods <code>guess_type</code> and <code>guess_image</code>.
They take either a filename or a hash reference.</p>
<p><code>guess_type</code> returns the MIME type of the file, and guess_image returns an
image name that represents the file.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: MIMETypes.pm,v 1.24 2005/04/02 08:08:46 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,521 @@
<!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>GT::Mail - A simple interface to parsing, sending, and creating email.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#creating_a_new_gt__mail_object">Creating a new GT::Mail object</a></li>
<li><a href="#parser__set_or_get_the_parse_object_">parser - Set or get the parse object.</a></li>
<li><a href="#parse__parsing_an_email_">parse - Parsing an email.</a></li>
<li><a href="#parse_head__parsing_just_the_head_">parse_head - Parsing just the head.</a></li>
<li><a href="#send__sending_an_email_">send - Sending an email.</a></li>
<li><a href="#top_part__getting_a_parts_object_">top_part - Getting a Parts object.</a></li>
<li><a href="#new_part__creating_a_parts_object_">new_part - Creating a Parts object.</a></li>
<li><a href="#attach__attaching_to_an_email_">attach - Attaching to an email.</a></li>
<li><a href="#to_string__getting_the_email_as_a_string_">to_string - Getting the email as a string.</a></li>
<li><a href="#as_string__getting_the_email_as_a_string_">as_string - Getting the email as a string.</a></li>
<li><a href="#build_email__building_an_email_">build_email - Building an email.</a></li>
<li><a href="#write__writing_an_email_to_a_file_handle_">write - Writing an email to a file handle.</a></li>
<li><a href="#naming__setting_the_naming_scheme_">naming - Setting the naming scheme.</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail - A simple interface to parsing, sending, and creating email.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Mail;
# Create and Sending
GT::Mail-&gt;send(
smtp =&gt; 'gossamer-threads.com',
smtp_port =&gt; 110, # optional; 110/465 (normal/SSL) will be used for the default
smtp_ssl =&gt; 1, # establish an SSL connection. Requires Net::SSLeay 1.06 or newer.
to =&gt; 'scott@gossamer-threads.com',
from =&gt; 'scott@gossamer-threads.com',
subject =&gt; 'Hello!!',
msg =&gt; 'I am a text email'
) or die &quot;Error: $GT::Mail::error&quot;;
# Parsing and sending
my $mail = GT::Mail-&gt;new(debug =&gt; 1);</pre>
<pre>
# Parse an email that is in a file called mail.test
my $parser = $mail-&gt;parse('mail.test') or die &quot;Error: $GT::Mail::error&quot;;
# Change who it is to
$parser-&gt;set(&quot;to&quot;, 'scott@gossamer-threads.com');</pre>
<pre>
# Add an attachment to it
$mail-&gt;attach (
type =&gt; 'text/plain',
encoding =&gt; '-guess',
body_path =&gt; 'Mail.pm',
filename =&gt; 'Mail.pm'
);
# Send the email we just parsed and modified
$mail-&gt;send(sendmail =&gt; '/usr/sbin/sendmail') or die &quot;Error: $GT::Mail::error&quot;;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail is a simple interface for parsing, creating, and sending email. It
uses GT::Mail::Send to send email and GT::Mail::Parse to parse and store email
data structurs. All the creation work is done from within GT::Mail.</p>
<p>
</p>
<h2><a name="creating_a_new_gt__mail_object">Creating a new GT::Mail object</a></h2>
<p>The arguments to <code>new()</code> in GT::Mail are mostly the same for all the class
methods in GT::Mail so I will be refering back to these further down. Mostly
these arguments are used to set parts of the header for creating an email. The
arguments can be passed in as either a hash or a hash ref. Any arguments aside
from these will be added to the content header as raw header fields. The
following is a list of the keys and a brief description.</p>
<dl>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
Sets the debug level for this object. Anything but zero will produce ouput on
STDERR.
</dd>
<p></p>
<dt><strong><a name="item_disposition">disposition</a></strong><br />
</dt>
<dd>
Sets the Content-Disposition.
</dd>
<p></p>
<dt><strong><a name="item_filename">filename</a></strong><br />
</dt>
<dd>
Sets the Content-Disposition to attachment and the file name to what to
specify.
</dd>
<p></p>
<dt><strong><a name="item_encoding">encoding</a></strong><br />
</dt>
<dd>
Sets the Content-Transfer-Encoding (You really should not set this).
</dd>
<p></p>
<dt><strong><a name="item_type">type</a></strong><br />
</dt>
<dd>
Sets the Content-Type.
</dd>
<p></p>
<dt><strong><a name="item_body_data">body_data</a></strong><br />
</dt>
<dd>
Sets the top level body data to the in memory string specified.
</dd>
<p></p>
<dt><strong><a name="item_msg">msg</a></strong><br />
</dt>
<dd>
Same as body_data.
</dd>
<p></p>
<dt><strong><a name="item_body_handle">body_handle</a></strong><br />
</dt>
<dd>
Sets the top level body to the File Handle.
</dd>
<p></p>
<dt><strong><a name="item_body_path">body_path</a></strong><br />
</dt>
<dd>
Sets the top level body path.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="parser__set_or_get_the_parse_object_">parser - Set or get the parse object.</a></h2>
<pre>
my $parser = $mail-&gt;parser;
$mail-&gt;parser($parser);</pre>
<p>Set or get method for the parser object that is used when you call <code>parse_head()</code>
or parse(). This object must conform to the method parse and parse_head. If no
object is passed to this method a <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parse.html">the GT::Mail::Parse manpage</a> object is created when
needed.</p>
<p>
</p>
<h2><a name="parse__parsing_an_email_">parse - Parsing an email.</a></h2>
<p>Instance method that returns a parts object. Emails are stored recursivly in
parts object. That is emails can have parts within parts within parts etc.. See
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> for details on the methods supported by the parts object
that is returned.</p>
<p>The <code>parse()</code> method takes only one argument. It can be a GLOB ref to a file
handle, a FileHandle object, or the path to a file. In any case the IO must
contain a valid formated email.</p>
<p>Once an email is parsed, you can make changes to it as you need and call the
send method to send it or call the write method to write it to file, etc.</p>
<p>This method will return false if an error occurs when parsing. The error
message will be set in $GT::Mail::error.</p>
<p>
</p>
<h2><a name="parse_head__parsing_just_the_head_">parse_head - Parsing just the head.</a></h2>
<p>This method does the exact same thing as the parse method but it will only
parse the top level header of the email. Any IO's will be reset after the
parsing.</p>
<p>Use this method if whether you want to parse and decode the body of the email
depends on what is in the header of the email or if you only need access to the
header. None of the parts will contain a body.</p>
<p>
</p>
<h2><a name="send__sending_an_email_">send - Sending an email.</a></h2>
<p>Class/Instance method for sending email. It sends the currently in memory
email. This means, if you parse an email, that email is in memory, if you
specify params for an email to new(), that is the email that gets sent. You can
also specify the params for the email to this method.</p>
<p>
</p>
<h2><a name="top_part__getting_a_parts_object_">top_part - Getting a Parts object.</a></h2>
<p>Instance method to set or get the top level part. If you are setting this, the
object must be from <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a>. You can use this to retrieve the part
object after you specify params to create an email. This object will contain
all the other parts for the email. e.g. attachments and emails that are
attached. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> for more details on this object.</p>
<p>
</p>
<h2><a name="new_part__creating_a_parts_object_">new_part - Creating a Parts object.</a></h2>
<p>Instance method to get a new part object. This method takes the same arguments
as the <code>new()</code> constructor. Returns the new part object. The part object is
added to the current email only if arguments are given otherwize just returns
an empty part.</p>
<p>
</p>
<h2><a name="attach__attaching_to_an_email_">attach - Attaching to an email.</a></h2>
<p>Instance method to attach to the in memory email. You can pass in a GT::Mail
object or you can pass the same arguments you would pass to <code>new()</code> to specify
all the information about the attachment. In addition if you specify a file
path and do not specify a mime type, this will attempt to guess the mime type
from the file extention.</p>
<p>
</p>
<h2><a name="to_string__getting_the_email_as_a_string_">to_string - Getting the email as a string.</a></h2>
<p>Returns the entire email as a string. Do not use this function if you have
attachments and are worried about memory ussage.</p>
<p>
</p>
<h2><a name="as_string__getting_the_email_as_a_string_">as_string - Getting the email as a string.</a></h2>
<p>Same as to_string.</p>
<p>
</p>
<h2><a name="build_email__building_an_email_">build_email - Building an email.</a></h2>
<p>Instance method that builds the currently in memory email. This method takes
one argument, a code ref. It calles the code ref with one argument. The code
ref is called for each section of the email that is created. A good example of
how to use this is what the as_string method does:</p>
<pre>
my $ret = '';
$obj-&gt;build_email(sub { $ret .= $_[0] });</pre>
<p>This puts the entire created email into the string $ret. You can use this, for
example to print the email to a filehandle (which is what the <code>write()</code> method
does).</p>
<p>
</p>
<h2><a name="write__writing_an_email_to_a_file_handle_">write - Writing an email to a file handle.</a></h2>
<p>Instance mothod that writes the currently in memory email to a file or file
handle. The only arguments this method takes is a file or a reference to a glob
that is a filehandle or FileHandle object.</p>
<p>
</p>
<h2><a name="naming__setting_the_naming_scheme_">naming - Setting the naming scheme.</a></h2>
<p>Instance method to specify a naming scheme for parsing emails. Calling this
after the email is parsed has no effect. This method just wraps to the one in
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parse.html">the GT::Mail::Parse manpage</a>.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Mail.pm,v 1.70 2004/11/04 20:23:09 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,536 @@
<!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>GT::Mail::BulkMail - A simplified interface to sending bulk emails</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#requirements">REQUIREMENTS</a></li>
<ul>
<li><a href="#methods">METHODS</a></li>
</ul>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::BulkMail - A (perhaps overly) simplified interface to sending bulk emails</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
$mailer = new GT::Mail::BulkMail;
$mailer-&gt;option(&quot;setting&quot;);
$mailer-&gt;otheroption(&quot;othersetting&quot;);
...
-- or --</pre>
<pre>
$mailer = new GT::Mail::BulkMail(
-option =&gt; &quot;setting&quot;,
-otheroption =&gt; &quot;othersetting&quot;,
...
);</pre>
<pre>
-- then --</pre>
<pre>
sub subroutine {
# Code to generate the next e-mail address
}
open FILE, &quot;email_list.txt&quot;;
%hash = ( 1 =&gt; 'some@fictional.address',
2 =&gt; 'who@knows.where'
);
@array = ('yet@another.fictional.address','and@one.more');
$mailer-&gt;send(\&amp;subroutine,\*FILE,\%hash,\@array);
close FILE;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::BulkMail is a module to handle mass mailings. It is capable of
using either sendmail, or an SMTP server. It has the advantage of
not requiring multiple connections to the SMTP server.</p>
<p>
</p>
<hr />
<h1><a name="requirements">REQUIREMENTS</a></h1>
<p>Perl 5.004</p>
<p>
</p>
<h2><a name="methods">METHODS</a></h2>
<p>All methods can be specified at object creation time as an option with the:
-option&nbsp;=&gt;&nbsp;value syntax. For example, <code>$mailer = new GT::Mail::BulkMail(-from =&gt; &quot;foo@bar.com&quot;)</code>
would have the same effect as: <code>$mailer = new GT::Mail::BulkMail(); $mailer-&gt;from(&quot;foo@bar.com&quot;)</code></p>
<dl>
<dt><strong><a name="item_smtp">smtp</a></strong><br />
</dt>
<dd>
Sets the SMTP server to use, and sets the object mail sending method to use SMTP. Takes
SMTP server as argument.
</dd>
<p></p>
<dt><strong><a name="item_sendmail">sendmail</a></strong><br />
</dt>
<dd>
Sets the sendmail executable to use. Takes the path to sendmail as the argument.
</dd>
<p></p>
<dt><strong><a name="item_text">text</a></strong><br />
</dt>
<dd>
Specifies that the mail format is text. This translates into Content-type: text/plain.
This is the default format.
</dd>
<p></p>
<dt><strong><a name="item_html">html</a></strong><br />
</dt>
<dd>
Specifies that the mail format is HTML. (Content-type: text/html)
</dd>
<p></p>
<dt><strong><a name="item_headers">headers</a></strong><br />
</dt>
<dd>
Returns any custom headers set as a hash reference in scalar context, or a hash in list context.
</dd>
<p></p>
<dt><strong><a name="item_add_header">add_header</a></strong><br />
</dt>
<dd>
Adds a single header. This can be any header starting with ``X-'' (Note that X-Mailer headers
will be prepended with the GT::Mail::BulkMail X-Mailer header (which includes the perl version,
OS name, GT::Mail::BulkMail module and CVS versions, and the Gossamer Threads homepage)). Pass
two arguments: A key (header name) and a value (header value). For example, for
<code>X-Foo: blah blah blah</code> you would use: $mailer-&gt;add_header(``X-Foo'' =&gt; ``blah blah blah'')
</dd>
<p></p>
<dt><strong><a name="item_add_headers">add_headers</a></strong><br />
</dt>
<dd>
Same as above, except it adds multiple headers. Has the same argument format. You would use:
$mailer-&gt;add_headers(``X-Foo1'' =&gt; ``blah'', ``X-Foo2'' =&gt; ``blah blah'');
</dd>
<p></p>
<dt><strong><a name="item_delete_header">delete_header</a></strong><br />
</dt>
<dd>
Deletes a single header. Pass the name of the header to delete.
</dd>
<p></p>
<dt><strong><a name="item_delete_headers">delete_headers</a></strong><br />
</dt>
<dd>
Delete multiple headers. Pass a list of names of headers to delete.
</dd>
<p></p>
<dt><strong><a name="item_from">from</a></strong><br />
</dt>
<dd>
Sets the ``from'' field of the e-mail. Must be set before $mailer-&gt;<a href="#item_send"><code>send()</code></a> can be called.
Must be set to an e-mail address. If this e-mail address is rejected by the SMTP server,
no e-mails will be sent.
</dd>
<p></p>
<dt><strong><a name="item_name">name</a></strong><br />
</dt>
<dd>
Sets the ``name'' field of the e-mail. This affects what is displayed in the ``From'' field.
When sending the email, the actual field will be set to: <code>&quot;This name&quot; &lt;some@name.net&gt;</code>.
Optional.
</dd>
<p></p>
<dt><strong><a name="item_subject">subject</a></strong><br />
</dt>
<dd>
Sets the subject of the message. If not specified, it will default to ``(no subject)''
</dd>
<p></p>
<dt><strong><a name="item_message">message</a></strong><br />
</dt>
<dd>
The body of the message. Can be left blank, but that seems rather pointless...
The message will be encoded using the quoted-printable format if it contains characters
outside the 7-bit range.
</dd>
<p></p>
<dt><strong><a name="item_success">success</a></strong><br />
</dt>
<dd>
A code reference to be run for each and every successful e-mail sending.
Each call to this code reference will be given the e-mail address as the only argument
(unless using a message ID, which is discussed below). Optional.
</dd>
<p></p>
<dt><strong><a name="item_failure">failure</a></strong><br />
</dt>
<dd>
A code reference that will be run for any email addresses that cannot be sent. Each
call to this code reference will be given the ID or e-mail address as the argument
(message IDs are discussed below). Optional.
</dd>
<p></p>
<dt><strong><a name="item_frompresend">frompresend</a></strong><br />
</dt>
<dt><strong><a name="item_namepresend">namepresend</a></strong><br />
</dt>
<dt><strong><a name="item_subjectpresend">subjectpresend</a></strong><br />
</dt>
<dt><strong><a name="item_messagepresend">messagepresend</a></strong><br />
</dt>
<dd>
A code reference that will be run before sending an e-mail. The 'from', 'name', 'subject',
or 'message' field will be sent to the code references (depending on which method called)
and whatever is returned will be used as the actual field for the email sent. This can be
used to parse fields to customize them for each recipient. The subroutine is called with
two arguments: (ID_OR_EMAIL, FIELD). If an ID is provided, it will be passed as the
first argument, otherwise the email address will be passed. The second argument is the
field itself. The field used in the actual email to the user will be the value returned by
the subroutine.
</dd>
<dd>
<p>The default field (for the rest of the mailing) can be changed by directly modifying $_[1]
itself.</p>
</dd>
<dd>
<p>If the subroutine reference returns an undefined value, the mailer will use the actual field
instead. You can use this technique to only modify some messages, but not others.</p>
</dd>
<dd>
<p>Optional.</p>
</dd>
<p></p>
<dt><strong><a name="item_show_errors">show_errors</a></strong><br />
</dt>
<dd>
If set to something true it will <code>warn()</code> on all errors. Optional. The default is turned on,
but can easily be changed by modifying the line '
</dd>
<p></p>
<dt><strong><a name="item_error_code">error_code</a></strong><br />
</dt>
<dd>
Takes a code reference - the code reference will be called with the error as the argument
when an error occurs. Optional.
</dd>
<p></p>
<dt><strong><a name="item_send">send</a></strong><br />
</dt>
<dd>
Takes any number of the following arguments:
</dd>
<dl>
<dt><strong><a name="item_array_reference">array reference</a></strong><br />
</dt>
<dd>
An array reference of a list of e-mail addresses to send to. After each message, either the
success or failure callback will be called with the e-mail address as the argument, and
possibly a message as the second argument.
</dd>
<p></p>
<dt><strong><a name="item_hash_reference">hash reference</a></strong><br />
</dt>
<dd>
A hash reference of ID =&gt; email pairs. For example,
123 =&gt; <a href="mailto:'someone@whoknows.com'.">'someone@whoknows.com'.</a> The value will be used as the e-mail address to send
to, and the key will be an identifier to pass into the success or failure callbacks.
</dd>
<p></p>
<dt><strong><a name="item_glob_reference">glob reference</a></strong><br />
</dt>
<dd>
A glob reference to an open file. Make sure the file is opened before passing this!
The file should contain one e-mail address per line.
</dd>
<p></p>
<dt><strong><a name="item_subroutine_or_code_reference">subroutine or code reference</a></strong><br />
</dt>
<dd>
You may pass a code reference, and it will be called for each e-mail address. It is
assumed that the subroutine will return one e-mail address each time called, and
that a return value of ``undef'' indicates that there are no more e-mail addresses.
The code reference could alternatively return two items - if it does, it is assumed that
the first is an ID code, and that the second is the email address. When a call to either
or the success or failure callbacks, the ID will be provided as the first argument
instead of the e-mail address itself.
</dd>
<dd>
<p>One cool feature to note about using code refs is that you can call <code>next()</code> from within
the code reference and it will then recall the code reference for the next value.</p>
</dd>
</dl>
</dl>
</body>
</html>

View File

@ -0,0 +1,454 @@
<!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>GT::Mail::Editor - E-mail template editor</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#tpl_load__loads_a_template__from_the_templates_">tpl_load - Loads a template (from the templates)</a></li>
<li><a href="#tpl_save__save_a_template">tpl_save - Save a template</a></li>
<li><a href="#load">load</a></li>
<li><a href="#new">new</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::Editor - E-mail template editor</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>Generally used from templates:</p>
<pre>
&lt;%GT::Mail::Editor::tpl_load(
dir =&gt; $template_root,
template =&gt; $template_set,
file =&gt; $filename,
header =&gt; From,
header =&gt; To,
header =&gt; Subject
)%&gt;</pre>
<pre>
&lt;%if error%&gt;
Unable to load e-mail template: &lt;%error%&gt;
&lt;%else%&gt;
From: &lt;input type=text name=header_From value=&quot;&lt;%header_From%&gt;&quot;&gt;
To: &lt;input type=text name=header_To value=&quot;&lt;%header_To%&gt;&quot;&gt;
Subject: &lt;input type=text name=header_Subject value=&quot;&lt;%header_Subject%&gt;&quot;&gt;
Other headers:&lt;br&gt;
&lt;textarea name=extra_headers&gt;
&lt;%loop extra_headers%&gt;&lt;%name%&gt;: &lt;%value%&gt;
&lt;%endloop%&gt;
&lt;%endif%&gt;</pre>
<pre>
- or -</pre>
<pre>
&lt;%GT::Mail::Editor::save(
dir =&gt; $template_root,
template =&gt; $template_set,
file =&gt; $filename,
header =&gt; To =&gt; $header_To,
header =&gt; From =&gt; $header_From,
header =&gt; Subject =&gt; $header_Subject,
extra_headers =&gt; $extra_headers
)%&gt;
&lt;%if error%&gt;Unable to save e-mail template: &lt;%error%&gt;
... Display the above form in here ...
&lt;%endif%&gt;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::Editor is designed to provide a template interface to creating and
editing a wide variety of e-mail templates. Although not currently supported,
eventually attachments, HTML, etc. will be supported.</p>
<p>
</p>
<h2><a name="tpl_load__loads_a_template__from_the_templates_">tpl_load - Loads a template (from the templates)</a></h2>
<p>Calling GT::Mail::Editor::tpl_load from a template returns variables required to
display a form to edit the template passed in.</p>
<dl>
<dt><strong><a name="item_dir">dir</a></strong><br />
</dt>
<dd>
Defines the base directory of templates.
</dd>
<p></p>
<dt><strong><a name="item_template">template</a></strong><br />
</dt>
<dd>
This defines a template set. This is optional. If present, this directory will
be tacked onto the end of 'dir'. This is simply to provide a more flexible way
to specify the template directory. For example, if you have 'dir' set to '/a/b'
and template set to 'c', then the directory '/a/b/c' will be used to save and
load e-mail templates.
</dd>
<p></p>
<dt><strong><a name="item_file">file</a></strong><br />
</dt>
<dd>
Specify the filename of the template inside the directory already specified with
'dir' and 'template'
</dd>
<p></p>
<dt><strong><a name="item_header">header</a></strong><br />
</dt>
<dd>
Multiple ``special'' headers can be requested with this. The argument following
each 'header' should be the name of a header, such as ``To''. Then, in the
variables returned from tpl_load(), you will have a variable such as 'header_To'
available, containing the value of the To: field.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="tpl_save__save_a_template">tpl_save - Save a template</a></h2>
<dl>
<dt><strong><a name="item_dir_template_file">dir template file</a></strong><br />
</dt>
<dd>
See the entries in <a href="#tpl_load">tpl_load</a>
</dd>
<p></p>
<dt><strong>header</strong><br />
</dt>
<dd>
Specifies that the two following arguments are the field and value of a header
field. For example, header =&gt; To =&gt; <a href="mailto:``abc@example.com''">``abc@example.com''</a> would specify that the To
field should be <a href="mailto:``abc@example.com''">``abc@example.com''</a> (To: <a href="mailto:abc@example.com).">abc@example.com).</a>
</dd>
<p></p>
<dt><strong><a name="item_extra_headers">extra_headers</a></strong><br />
</dt>
<dd>
The value to extra_headers should be a newline-delimited list of headers other
than those specified with header. These will be parsed, and blank lines skipped.
</dd>
<p></p>
<dt><strong><a name="item_body">body</a></strong><br />
</dt>
<dd>
The body of the message. Need I say more? MIME messages are possible by
inserting them directly into the body, however currently MIME messages cannot
be created using this editor.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="load">load</a></h2>
<p>Attempts to load a GT::Mail::Editor object with data passed in. This can take
either a file handle or a filename. If passing a filename, dir and template
will be used (if available). You should construct an object with <code>new()</code> prior
to calling this method.</p>
<p>
</p>
<h2><a name="new">new</a></h2>
<p>Constructs a new GT::Mail::Editor object. This will be done automatically when
using the template methods <a href="#tpl_load">tpl_load</a> and <a href="#tpl_save">tpl_save</a>. Takes the following
arguments:</p>
<dl>
<dt><strong>dir</strong><br />
</dt>
<dd>
Defines the base directory of templates.
</dd>
<p></p>
<dt><strong>template</strong><br />
</dt>
<dd>
This defines a template set. This is optional. If present, this directory will
be tacked onto the end of 'dir'. This is simply to provide a more flexible way
to specify the template directory. For example, if you have 'dir' set to '/a/b'
and template set to 'c', then the directory '/a/b/c' will be used to save and
load e-mail templates.
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Editor.pm,v 1.24 2005/01/18 23:06:40 bao Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Mail/Editor/HTML.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Mail/Editor/Text.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,364 @@
<!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>GT::Mail::Encoder - MIME Encoder</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#encoding_a_stream">Encoding a stream</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::Encoder - MIME Encoder</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
open IN, 'decoded.txt' or die $!;
open OUT, '&gt;encoded.txt' or die $!;
if (GT::Mail::Encoder-&gt;supported ('7bit')) {
GT::Mail::Encoder-&gt;decode (
debug =&gt; 1,
encoding =&gt; '7bit',
in =&gt; \*IN,
out =&gt; sub { print OUT $_[0] }
) or die $GT::Mail::Encoder::error;
}
else {
die &quot;Unsupported encoding&quot;;
}
close IN;
close OUT;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::Encoder is a MIME Encoder implemented in perl. It will try to use
the C extension for encoding Base64. If the extension is not there
it will do it in perl (slow!).</p>
<p>
</p>
<h2><a name="encoding_a_stream">Encoding a stream</a></h2>
<p>The <code>new()</code> constructor and the <code>supported()</code> class method are the only methods that
are public in the interface. The <code>new()</code> constructor takes a hash of params.
The <code>supported()</code> method takes a single string, the name of the encoding you want
to encode and returns true if the encoding is supported and false otherwise.</p>
<dl>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
Set debugging level. 1 or 0.
</dd>
<p></p>
<dt><strong><a name="item_encoding">encoding</a></strong><br />
</dt>
<dd>
Sets the encoding used to encode.
</dd>
<p></p>
<dt><strong><a name="item_in">in</a></strong><br />
</dt>
<dd>
Set to a file handle or IO handle.
</dd>
<p></p>
<dt><strong><a name="item_out">out</a></strong><br />
</dt>
<dd>
Set to a code reference, the decoded stream will be passed in at the first
argument for each chunk encoded.
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Encoder.pm,v 1.40 2004/01/13 01:35:17 jagerman Exp $
</p>
</body>
</html>

View File

@ -0,0 +1,399 @@
<!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>GT::Mail::Message - Encapsolates an email message.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#creating_a_new_gt__mail__message_object">Creating a new GT::Mail::Message object</a></li>
<li><a href="#creating_a_new_part">Creating a new Part</a></li>
<li><a href="#manipulating_parts">Manipulating Parts</a></li>
<li><a href="#accessing_parts">Accessing Parts</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::Message - Encapsolates an email message.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Mail::Message;
# Get a GT::Mail::Message object from the parser
use GT::Mail::Parse;</pre>
<pre>
my $parser = new GT::Mail::Parse( in_file =&gt; &quot;myemail.eml&quot; );
my $message = $parser-&gt;parse;</pre>
<pre>
# Get the top level part
my $root_part = $message-&gt;root_part;</pre>
<pre>
# Replace the first part with a new part
$message-&gt;replace_part( $root_part, $message-&gt;new_part(
to =&gt; 'scott@gossamer-threads.com',
from =&gt; 'alex@gossamer-threads.com',
'content-type' =&gt; 'text/plain',
body_data =&gt; 'Hi Scott, how are you?!'
);</pre>
<pre>
# Add a part at the end
my $end_part = $message-&gt;new_part(
'content-type' =&gt; 'image/gif',
body_path =&gt; 'myimage.jpg'
);
$message-&gt;add_part_end( $root_part, $end_part );</pre>
<pre>
# Move the first part in the top part to after the end part
$message-&gt;move_part_after( $root_part-&gt;parts-&gt;[0], $end_part );</pre>
<pre>
# Print the mime message
print $message-&gt;to_string;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::Message encapsolates a mime message which consists of
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> object. This module provides methods to change,
move, remove, and access these parts.</p>
<p>
</p>
<h2><a name="creating_a_new_gt__mail__message_object">Creating a new GT::Mail::Message object</a></h2>
<p>Usually you will get a GT::Mail::Message object by call the parse method
in <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parse.html">the GT::Mail::Parse manpage</a>.</p>
<pre>
my $message = $parser-&gt;parse;</pre>
<p>You may also call new on this class specifying the top level part and or
a debug level.</p>
<pre>
my $message = new GT::Mail::Message(
root_part =&gt; $part,
debug =&gt; 1
);</pre>
<p>
</p>
<h2><a name="creating_a_new_part">Creating a new Part</a></h2>
<p>You can create a part by calling new on <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> directly</p>
<pre>
my $part = new GT::Mail::Parts;
$part-&gt;set( 'content-type' =&gt; 'image/gif' );
$part-&gt;body_path( 'myimage.gif' );</pre>
<p>or you can call a method in this module to get a new part</p>
<pre>
my $part = $message-&gt;new_part(
'content-type' =&gt; 'image/gif',
body_path =&gt; 'myimage.gif'
);</pre>
<p>This method is a wraper on a combination of <code>new()</code> and some other
supporting methods in <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> such as body_path(). Anything
that is not <strong>body_path</strong>, <strong>body_data</strong>, or <strong>body_handle</strong> is treated
as header values.</p>
<p>
</p>
<h2><a name="manipulating_parts">Manipulating Parts</a></h2>
<p>A MIME message is just a format for storing a tree structure. We provide
tree-like methods to manipulate parts. All the method for manipulating
parts take the part <code>object(s)</code> as arguments. We do this so you do not need
to know how the tree is tracked internally.</p>
<p>
</p>
<h2><a name="accessing_parts">Accessing Parts</a></h2>
<p>More to come!</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a>
</p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Message.pm,v 1.14 2004/01/13 01:35:17 jagerman Exp $
</p>
<pre>
</pre>
</body>
</html>

View File

@ -0,0 +1,594 @@
<!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>GT::Mail::POP3 - Receieve email through POP3 protocal</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#new__constructor_method">new - constructor method</a></li>
<li><a href="#connect__connect_to_the_pop_account">connect - Connect to the POP account</a></li>
<li><a href="#head_part__access_the_email_header">head_part - Access the email header</a></li>
<li><a href="#all_head_parts__access_all_email_headers">all_head_parts - Access all email headers</a></li>
<li><a href="#parse_message__access_an_email">parse_message - Access an email</a></li>
<li><a href="#message_save__save_an_email">message_save - Save an email</a></li>
<li><a href="#stat__do_a_stat_command">stat - Do a STAT command</a></li>
<li><a href="#list__do_a_list_command">list - Do a LIST command</a></li>
<li><a href="#rset__do_an_rset_command">rset - Do an RSET command</a></li>
<li><a href="#dele__do_a_dele_command">dele - Do a DELE command</a></li>
<li><a href="#quit__quit_the_connection">quit - Quit the connection</a></li>
<li><a href="#uidl__do_a_uidl_command">uidl - Do a UIDL command</a></li>
<li><a href="#count__get_the_number_of_messages">count - Get the number of messages</a></li>
<li><a href="#size__get_the_size_of_all_messages">size - Get the size of all messages</a></li>
<li><a href="#send__send_a_raw_command">send - Send a raw command</a></li>
<li><a href="#top__retrieve_the_header">top - Retrieve the header</a></li>
<li><a href="#retr__retrieve_an_email">retr - Retrieve an email</a></li>
</ul>
<li><a href="#requirements">REQUIREMENTS</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::POP3 - Receieve email through POP3 protocal</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Mail::POP3;</pre>
<pre>
my $pop = GT::Mail::POP3-&gt;new(
host =&gt; 'mail.gossamer-threads.com',
port =&gt; 110,
user =&gt; 'someusername',
pass =&gt; 'somepassword',
auth_mode =&gt; 'PASS',
timeout =&gt; 30,
debug =&gt; 1
);</pre>
<pre>
my $count = $pop-&gt;connect or die $GT::Mail::POP3::error;</pre>
<pre>
for my $num (1 .. $count) {
my $top = $pop-&gt;parse_head($num);</pre>
<pre>
my @to = $top-&gt;split_field;</pre>
<pre>
if (grep /myfriend\@gossamer-threads\.com/, @to) {
$pop-&gt;message_save($num, '/keep/email.txt');
last;
}
}</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::POP3 is a module to check an email account using the POP3 protocol.
Many of the methods are integrated with <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parse.html">the GT::Mail::Parse manpage</a>.</p>
<p>
</p>
<h2><a name="new__constructor_method">new - constructor method</a></h2>
<p>This method is inherited from <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Base.html">the GT::Base manpage</a>. The argument to this method can be
in the form of a hash or hash ref. As a minimum 'user', 'pass', and 'host' must
be specified.</p>
<dl>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
Sets the debugging level for this instance of GT::Mail::POP3.
</dd>
<p></p>
<dt><strong><a name="item_host">host</a></strong><br />
</dt>
<dd>
Sets the host to connect to for checking a POP account. This argument must be
provided.
</dd>
<p></p>
<dt><strong><a name="item_port">port</a></strong><br />
</dt>
<dd>
Sets the port on the POP server to attempt to connect to. This defaults to 110,
unless using SSL, for which the default is 995.
</dd>
<p></p>
<dt><strong><a name="item_ssl">ssl</a></strong><br />
</dt>
<dd>
Establishes the connection using SSL. Note that this requires Net::SSLeay of
at least version 1.06.
</dd>
<p></p>
<dt><strong><a name="item_user">user</a></strong><br />
</dt>
<dd>
Sets the user name to login with when connecting to the POP server. This must
be specified.
</dd>
<p></p>
<dt><strong><a name="item_pass">pass</a></strong><br />
</dt>
<dd>
Sets the password to login with when connection to the POP server. This must be
specified.
</dd>
<p></p>
<dt><strong><a name="item_auth_mode">auth_mode</a></strong><br />
</dt>
<dd>
Sets the authentication type for this connection. This can be one of two
values. PASS (the default) or APOP. If set to APOP, GT::Mail::POP3 will use
APOP to login to the remote server.
</dd>
<p></p>
<dt><strong><a name="item_timeout">timeout</a></strong><br />
</dt>
<dd>
Sets the connection timeout. This isn't entirely reliable as it uses alarm(),
which isn't supported on all systems. That aside, this normally isn't needed
if you want a timeout - it defaults to 30 on alarm()-supporting systems. The
main purpose is to provide a value of 0 to disable the <code>alarm()</code> timeout.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="connect__connect_to_the_pop_account">connect - Connect to the POP account</a></h2>
<pre>
$obj-&gt;connect or die $GT::Mail::POP3::error;</pre>
<p>This method performs the connection to the POP server. Returns the count of
messages on the server on success, and undefined on failure. Takes no arguments
and called before you can perform any actions on the POP server.</p>
<p>
</p>
<h2><a name="head_part__access_the_email_header">head_part - Access the email header</a></h2>
<pre>
# Get a parsed header part object for the first email in the list.
my $top_part = $obj-&gt;head_part(1);</pre>
<p>Instance method. The only argument to this method is the message number to get.
Returns a <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> object containing only the parsed header of the
specified message.</p>
<p>
</p>
<h2><a name="all_head_parts__access_all_email_headers">all_head_parts - Access all email headers</a></h2>
<pre>
# Get all the head parts from all messages
my @headers = $obj-&gt;all_head_parts;</pre>
<p>Instance method. Gets all the headers of all the email's on the remote server.
Returns an array of the <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> object. One object for each
email. None of the email's bodies are retrieved, only the head.</p>
<p>
</p>
<h2><a name="parse_message__access_an_email">parse_message - Access an email</a></h2>
<pre>
# Parse an email and get the GT::Mail object
my $mail = $obj-&gt;parse_message (1);</pre>
<p>Instance method. Pass in the number of the email to retrieve. This method
retrieves the specified email and returns the parsed GT::Mail object. If this
method fails you should check $GT::Mail::error for the error message.</p>
<p>
</p>
<h2><a name="message_save__save_an_email">message_save - Save an email</a></h2>
<pre>
open FH, '/path/to/email.txt' or die $!;</pre>
<pre>
# Save message 2 to file
$obj-&gt;message_save (2, \*FH);
close FH;</pre>
<p>- or -</p>
<pre>
$obj-&gt;message_save (2, '/path/to/email.txt') or die $GT::Mail::POP3::error;</pre>
<p>Instance method. This method takes the message number as it's first argument,
and either a file path or a file handle ref as it's second argument. If a file
path is provided the file will be opened to truncate. The email is then
retrieved from the server and written to the file.</p>
<p>
</p>
<h2><a name="stat__do_a_stat_command">stat - Do a STAT command</a></h2>
<pre>
# Get the number of messages on the server
my $count = $obj-&gt;stat;</pre>
<p>Instance method. Does a STAT command on the remote server. It stores the total
size and returns the count of messages on the server, if successful. Otherwise
returns undef.</p>
<p>
</p>
<h2><a name="list__do_a_list_command">list - Do a LIST command</a></h2>
<pre>
# At a list of messages on the server
my @messages = $obj-&gt;list;</pre>
<p>Instance method. Does a LIST command on the remote server. Returns an array of
the lines in list context and a single scalar that contains all the lines in
scalar context.</p>
<p>
</p>
<h2><a name="rset__do_an_rset_command">rset - Do an RSET command</a></h2>
<pre>
# Tell the server to ignore any dele commands we have issued in this
# session
$obj-&gt;rset;</pre>
<p>Instance method. Does an RSET command. This command resets the servers
knowledge of what should be deleted when QUIT is called. Returns 1 on success.</p>
<p>
</p>
<h2><a name="dele__do_a_dele_command">dele - Do a DELE command</a></h2>
<pre>
# Delete message 4
$obj-&gt;dele (4);</pre>
<p>Instance method. Does a DELE command. The only argument is the message number
to delete. Returns 1 on success.</p>
<p>
</p>
<h2><a name="quit__quit_the_connection">quit - Quit the connection</a></h2>
<pre>
# Close our connection
$obj-&gt;quit;</pre>
<p>Instance method. Sends the QUIT command to the server. The should should
disconnect soon after this. No more actions can be taken on this connection
until connect is called again.</p>
<p>
</p>
<h2><a name="uidl__do_a_uidl_command">uidl - Do a UIDL command</a></h2>
<pre>
# Get the uidl for message 1
my $uidl = $obj-&gt;uidl (1);</pre>
<pre>
# Get a list of all the uidl's and print them
$obj-&gt;uidl (sub { print @_ });</pre>
<pre>
# Get an array of all the uidl's
my @uidl = $obj-&gt;uidl;</pre>
<p>Instance method. Attempts to do a UIDL command on the remote server. Please be
aware support for the UIDL command is not very wide spread. This method can
take the message number as it's first argument. If the message number is given,
the UIDL for that message is returned. If the first argument is a code
reference, a UIDL command is done with no message specified and the code
reference is called for each line returned from the remote server. If no second
argument is given, a UIDL command is done, and the results are returned in a
has of message number to UIDL.</p>
<p>
</p>
<h2><a name="count__get_the_number_of_messages">count - Get the number of messages</a></h2>
<pre>
# Get the count from the last STAT
my $count = $obj-&gt;count;</pre>
<p>This method returns the number of messages on the server from the last STAT
command. A STAT is done on connect.</p>
<p>
</p>
<h2><a name="size__get_the_size_of_all_messages">size - Get the size of all messages</a></h2>
<pre>
# Get the total size of all messages on the server
my $size = $obj-&gt;size;</pre>
<p>This method returns the size of all messages in the server as returned by the
last STAT command sent to the server.</p>
<p>
</p>
<h2><a name="send__send_a_raw_command">send - Send a raw command</a></h2>
<pre>
# Send a raw command to the server
my $ret = $obj-&gt;send (&quot;HELO&quot;);</pre>
<p>This method sends the specified raw command to the POP server. The one line
return from the server is returned. Do not call this method if you are
expecting more than a one line response.</p>
<p>
</p>
<h2><a name="top__retrieve_the_header">top - Retrieve the header</a></h2>
<pre>
# Get the header of message 2 in an array. New lines are stripped
my @header = $obj-&gt;top (2);</pre>
<pre>
# Get the header as a string
my $header = $obj-&gt;top (2);</pre>
<p>Instance method to retrieve the top of an email on the POP server. The only
argument should be the message number to retrieve. Returns a scalar containing
the header in scalar context and an array, which is the scalar split on
\015?\012, in list context.</p>
<p>
</p>
<h2><a name="retr__retrieve_an_email">retr - Retrieve an email</a></h2>
<pre>
# Get message 3 from the remote server in an array. New lines are stripped
my @email = $obj-&gt;retr (3);</pre>
<pre>
# Get it as a string
my $email = $obj-&gt;retr (3);</pre>
<p>Instance method to retrieve an email from the POP server. The first argument to
this method should be the message number to retrieve. The second argument is an
optional code ref to call for each line of the message that is retrieved. If no
code ref is specified, this method will put the email in a scalar and return
the scalar in scalar context and return the scalar split on \015?\012 in list
context.</p>
<p>
</p>
<hr />
<h1><a name="requirements">REQUIREMENTS</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Socket/Client.html">the GT::Socket::Client manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Base.html">the GT::Base manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/MD5.html">the GT::MD5 manpage</a> (for APOP authentication)</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: POP3.pm,v 1.56 2004/03/19 00:36:16 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,420 @@
<!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>GT::Mail::Parse - MIME Parse</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#new__constructor_method">new - Constructor method</a></li>
<li><a href="#parse__parse_an_email">parse - Parse an email</a></li>
<li><a href="#parse_head__parse_just_the_header_of_the_email">parse_head - Parse just the header of the email</a></li>
<li><a href="#size__get_the_size">size - Get the size</a></li>
<li><a href="#all_parts__get_all_parts">all_parts - Get all parts</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::Parse - MIME Parse</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Mail::Parse
my $parser = new GT::Mail::Parse (
naming =&gt; \&amp;name_files,
in_file =&gt; '/path/to/file.eml',
debug =&gt; 1
);</pre>
<pre>
my $top = $parser-&gt;parse or die $GT::Mail::Parse::error;</pre>
<pre>
- or -</pre>
<pre>
my $parser = new GT::Mail::Parse;
open FH, '/path/to/file.eml' or die $!;
my $top = $parser-&gt;parse (
naming =&gt; \&amp;name_files,
handle =&gt; \*FH,
debug =&gt; 1
) or die $GT::Mail::Parse::error;
close FH;</pre>
<pre>
- or -</pre>
<pre>
my $parser = new GT::Mail::Parse;</pre>
<pre>
my $top_head = $parser-&gt;parse_head (
naming =&gt; \&amp;name_files,
in_file =&gt; '/path/to/file.eml',
debug =&gt; 1
) or die $GT::Mail::Parse::error;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::Parse is a 100% rfc822 email MIME parser that supports unlimited
nested levels of MIME. Emails are parsed into <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> objects. Each
part knows where it's body is and each part contains it's sub parts. See
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> for details on parts methods.</p>
<p>
</p>
<h2><a name="new__constructor_method">new - Constructor method</a></h2>
<p>This is the constructor method to get a GT::Mail::Parse object, which you
need to access all the methods (there are no Class methods). <code>new()</code> takes
a hash or hash ref as it's arguments. Each key has an accessor method by the
same name except debug, which can only be set by passing debug to new(), <code>parse()</code>
or parse_head().</p>
<dl>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
Sets the debug level for this insance of the class.
</dd>
<p></p>
<dt><strong><a name="item_naming">naming</a></strong><br />
</dt>
<dd>
Specify a code reference to use as a naming convention for each part of the
email being parsed. This is useful to keep file IO down when you want the emails
seperated into each part as a file. If this is not specified GT::Mail::Parse
uses a default naming, which is to start at one and incriment that number for each
attachment. The attachments would go in the current working directory.
</dd>
<p></p>
<dt><strong><a name="item_in_file">in_file</a></strong><br />
</dt>
<dd>
Specify the path to the file that contains the email to be parsed. One of in_file
and handle must be specified.
</dd>
<p></p>
<dt><strong><a name="item_handle">handle</a></strong><br />
</dt>
<dd>
Specify the file handle or IO stream that contains the email to be parsed.
</dd>
<p></p></dl>
<dl>
<dt><strong><a name="item_attach_rfc822">attach_rfc822</a></strong><br />
</dt>
<dd>
By default, the parser will decode any embeded emails, and flatten out all the
parts. If you prefer to leave embeded emails unparsed, pass in 1 to this option
and the parser will treat it as an attachment.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="parse__parse_an_email">parse - Parse an email</a></h2>
<p>Instance method. Parses the email specified by either in_file or handle. Returns
the top level <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parts.html">the GT::Mail::Parts manpage</a> object. Any additional parameters passed in are
treated the same as if they were passed to the constuctor.</p>
<p>
</p>
<h2><a name="parse_head__parse_just_the_header_of_the_email">parse_head - Parse just the header of the email</a></h2>
<p>Instance method. This method is exactly the same as parse except only the top
level header is parsed and it's part object returned. This is useful to keep
overhead down if you only need to know about the header of the email.</p>
<p>
</p>
<h2><a name="size__get_the_size">size - Get the size</a></h2>
<p>Instance method. Returns the total size in bytes of the parsed unencoded email. This
method will return undef if no email has been parsed.</p>
<p>
</p>
<h2><a name="all_parts__get_all_parts">all_parts - Get all parts</a></h2>
<p>Instance method. Returns all the parts in the parsed email. This is a flatened
list of the objects. Somewhat similar to what MIME::Tools does. All the parts
still contain their sub parts.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Parse.pm,v 1.79 2004/10/23 02:16:39 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,570 @@
<!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>GT::Mail::Parts - Data storage class for MIME parts</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#effective_type__access_the_effective_mime_type">effective_type - Access the effective MIME type</a></li>
<li><a href="#get__access_header_tags_">get - Access header tags.</a></li>
<li><a href="#set__set_a_header_tag_">set - Set a header tag.</a></li>
<li><a href="#delete__remove_a_header_tag_">delete - Remove a header tag.</a></li>
<li><a href="#size__access_the_total_size_">size - Access the total size.</a></li>
<li><a href="#preamble__set_or_get_the_preamble_">preamble - Set or get the preamble.</a></li>
<li><a href="#epilogue__set_or_get_the_epilogue_">epilogue - Set or get the epilogue.</a></li>
<li><a href="#mime_type__set_or_get_the_mime_type_">mime_type - Set or get the MIME type.</a></li>
<li><a href="#is_multipart__see_if_you_have_a_multipart_part_">is_multipart - See if you have a multi-part part.</a></li>
<li><a href="#parts__access_sub_parts_">parts - Access sub parts.</a></li>
<li><a href="#multipart_boundary__set_or_get_the_multipart_boundary_">multipart_boundary - Set or get the multi-part boundary.</a></li>
<li><a href="#header_as_string__access_the_whole_header_">header_as_string - Access the whole header.</a></li>
<li><a href="#split_field__retrieve_the_emails_split_up_into_an_array_">split_field - Retrieve the emails split up into an array.</a></li>
<li><a href="#suggest_encoding__get_a_suggestion_for_encoding_">suggest_encoding - Get a suggestion for encoding.</a></li>
<li><a href="#recommended_filename__figure_out_the_file_name_">recommended_filename - Figure out the file name.</a></li>
<li><a href="#body_as_string__get_the_body_as_a_string_">body_as_string - Get the body as a string.</a></li>
<li><a href="#body_in__find_the_body_">body_in - Find the body.</a></li>
<li><a href="#body_data__get_the_in_memory_body_">body_data - Get the in memory body.</a></li>
<li><a href="#body_handle__get_an_io_handle_to_the_body_">body_handle - Get an IO handle to the body.</a></li>
<li><a href="#body_path__get_the_location_of_the_file_the_body_is_in_">body_path - Get the location of the file the body is in.</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::Parts - Data storage class for MIME parts</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Mail;</pre>
<pre>
my $mail = new GT::Mail;</pre>
<pre>
my $top_part = $mail-&gt;parse('/path/to/email');</pre>
<pre>
# Access the emails as an array
my @to = $top_part-&gt;split_field('to');
my @from = $top_part-&gt;split_field('from');</pre>
<pre>
# Access to the header fields
my $mailer = $top_part-&gt;get('X-Mailer');
my $subject = $top_part-&gt;get('Subject');</pre>
<pre>
# Access to this parts sub part
if ($top_part-&gt;is_multipart) {
my @parts = $top_parts-&gt;parts;
for my $part (@parts) {</pre>
<pre>
# Access parts of the header
print &quot;Filename: &quot;, $part-&gt;recommended_filename, &quot;\n&quot;;
print &quot;Part is multi-part\n&quot; if $part-&gt;is_multipart;</pre>
<pre>
# Get the body as a string
my $body = $part-&gt;body_as_string;
}
}</pre>
<pre>
# Change who it is to
$top_part-&gt;set('to', 'scott@gossamer-threads.com');</pre>
<pre>
# Remove the bcc line
$top_part-&gt;delete('bcc');</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::Parts is a class to provide methods to change and
access a MIME messages. The object for this class is meant to
be istansiated from <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail.html">the GT::Mail manpage</a>.</p>
<p>
</p>
<h2><a name="effective_type__access_the_effective_mime_type">effective_type - Access the effective MIME type</a></h2>
<pre>
my $type = $obj-&gt;effective_type;</pre>
<pre>
if ($type eq 'application/octet-stream') {
...
}</pre>
<p>This method returns the effective MIME Type of this objects part.</p>
<p>
</p>
<h2><a name="get__access_header_tags_">get - Access header tags.</a></h2>
<pre>
my $subj = $obj-&gt;get('Subject');</pre>
<pre>
# or if there is more than one
my @recv = $obj-&gt;get('Received');</pre>
<p>Used to access any of the tags in the header of the MIME part. If the
tag requested is not present returns false. The first argument to this
method is the name of he tag you want to extract. This is case insensitive.</p>
<p>
</p>
<h2><a name="set__set_a_header_tag_">set - Set a header tag.</a></h2>
<pre>
# Change who the email is to
$obj-&gt;set('to', 'scott@gossamer-threads.com');</pre>
<pre>
# Change the second Received tag
$obj-&gt;set('Received', 'from unknown', 1);</pre>
<p>Set any of the tags in the header. If the tag does not exist this will create
it. This method takes three arguments. The first is the name of the tag to
change or add, this is case insensitive. The second argument is the value for
the tag. The third zero based optional argument is the position. The position
will default to zero if it is not specified.</p>
<p>
</p>
<h2><a name="delete__remove_a_header_tag_">delete - Remove a header tag.</a></h2>
<pre>
# Delete who the message is from
$obj-&gt;delete('from');</pre>
<p>This method deletes the tag specified by the first argument from this MIME
part.</p>
<p>
</p>
<h2><a name="size__access_the_total_size_">size - Access the total size.</a></h2>
<pre>
my $size = $obj-&gt;size;</pre>
<p>This method returns the total size of this part. This includes the header and
the body.</p>
<p>
</p>
<h2><a name="preamble__set_or_get_the_preamble_">preamble - Set or get the preamble.</a></h2>
<pre>
# Retrieve the preamble
my $pre = $obj-&gt;preamble;</pre>
<pre>
# Set the preamble
$obj-&gt;preamble('This is a multi-part message in MIME format.');</pre>
<p>This is a set get method for the preamble. The preamble is the part after the
head but before the first MIME boundary. This method makes no since if this
is not a multi-part part.</p>
<p>
</p>
<h2><a name="epilogue__set_or_get_the_epilogue_">epilogue - Set or get the epilogue.</a></h2>
<pre>
# Retrieve the epilogue
my $ep = $obj-&gt;epilogue;</pre>
<pre>
# Set the epilogue
$obj-&gt;epilogue('This is my cool epilogue');</pre>
<p>This is a set get method for the epilogue. The epilogue is the part of the
MIME part after the MIME boundary and before the next head. This method makes
no since if this is not a multi-part part.</p>
<p>
</p>
<h2><a name="mime_type__set_or_get_the_mime_type_">mime_type - Set or get the MIME type.</a></h2>
<pre>
my ($type, $subtype) = split('/', $obj-&gt;mime_type);</pre>
<p>This method returns the MIME type of this part. You can pass in an argument
to change the MIME type as well. So you could do</p>
<pre>
$obj-&gt;mime_type('text/plain');</pre>
<p>This is probably not such a good idea unless you are constructing the email from
scratch.</p>
<p>
</p>
<h2><a name="is_multipart__see_if_you_have_a_multipart_part_">is_multipart - See if you have a multi-part part.</a></h2>
<pre>
if ($obj-&gt;is_multipart) {
# do some multi-part stuff
}</pre>
<p>Returns true is this part is a multi-part MIME part.</p>
<p>
</p>
<h2><a name="parts__access_sub_parts_">parts - Access sub parts.</a></h2>
<pre>
my @parts = $obj-&gt;parts;</pre>
<p>Returns the parts object this part contains. Returns false if this part does
no have any sub parts. The parts objects that returns are from this same class.
Any parts that are milti-part should contain parts.</p>
<p>
</p>
<h2><a name="multipart_boundary__set_or_get_the_multipart_boundary_">multipart_boundary - Set or get the multi-part boundary.</a></h2>
<pre>
my $boundary = $obj-&gt;multipart_boundary;</pre>
<p>This returns the multi-part boundary for this part. Setting this is never needed
and may be removed in the future. This method only makes since if you are working
with a multi-part pert.</p>
<p>
</p>
<h2><a name="header_as_string__access_the_whole_header_">header_as_string - Access the whole header.</a></h2>
<pre>
my $head = $obj-&gt;header_as_string;</pre>
<p>This method creates and returns the header for this part. The returned header should
be fully rfc822 compliant. Avoid calling this method more than once, as it will build
the header from an internal data structure each time.</p>
<p>
</p>
<h2><a name="split_field__retrieve_the_emails_split_up_into_an_array_">split_field - Retrieve the emails split up into an array.</a></h2>
<pre>
my @to = $obj-&gt;split_field; # Defaults to 'to'
my @bcc = $obj-&gt;split_field('bcc');</pre>
<p>This is mostly a utility method. It takes an option argument as to the field you want
the email address from (default is to), it then splits the emails on '\s*,\s*' that is
not inside quotes. Returns an array of the split up string.</p>
<p>
</p>
<h2><a name="suggest_encoding__get_a_suggestion_for_encoding_">suggest_encoding - Get a suggestion for encoding.</a></h2>
<pre>
my $encode = $obj-&gt;suggest_encoding;</pre>
<p>Returns a suggested encoding for the body of this message. This is useful to decide
what encoding you should use for the body when building an email. This is used in
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parse.html">the GT::Mail::Parse manpage</a> to decide how to encode the message body.</p>
<p>
</p>
<h2><a name="recommended_filename__figure_out_the_file_name_">recommended_filename - Figure out the file name.</a></h2>
<pre>
my $file = $obj-&gt;recommended_filename;
if ($file) {
...
}</pre>
<p>This method tries to figure out the file name of this part. This does not make much
since if this part is not an attachment of some kind. Returns an empty string on
failure.</p>
<p>
</p>
<h2><a name="body_as_string__get_the_body_as_a_string_">body_as_string - Get the body as a string.</a></h2>
<p>This method returns the entire body of the MIME message as a string. You should not
use this method if the body could be large.</p>
<p>
</p>
<h2><a name="body_in__find_the_body_">body_in - Find the body.</a></h2>
<pre>
my $in = $obj-&gt;body_in;
my $body;</pre>
<pre>
if ($in eq 'MEMORY') {
$body = $obj-&gt;body_data;
}
elsif ($in eq 'HANDLE') {
$body = $obj-&gt;body_handle;
}
elsif ($in eq 'FILE') {
$body = $obj-&gt;body_path;
}</pre>
<p>This method returns the location of the body. The location can be one of three things:</p>
<dl>
<dt><strong><a name="item_memory">MEMORY</a></strong><br />
</dt>
<dd>
The body is in a string.
</dd>
<p></p>
<dt><strong><a name="item_handle">HANDLE</a></strong><br />
</dt>
<dd>
The body is in an IO handle.
</dd>
<p></p>
<dt><strong><a name="item_file">FILE</a></strong><br />
</dt>
<dd>
The body is in a file.
</dd>
<p></p></dl>
<p>You would use this to decide what method to use to access the body. If the MIME message
was parsed into GT::Mail::Parts using <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Mail/Parser.html">the GT::Mail::Parser manpage</a> the body will always be in
a FILE.</p>
<p>
</p>
<h2><a name="body_data__get_the_in_memory_body_">body_data - Get the in memory body.</a></h2>
<p>This method returns the body if it is stored in memory. Returns undefined if the body is
not in memory.</p>
<p>
</p>
<h2><a name="body_handle__get_an_io_handle_to_the_body_">body_handle - Get an IO handle to the body.</a></h2>
<p>This method returns a handle to the body if the body is stored in a handle for this part.
Returns undefined if not.</p>
<p>
</p>
<h2><a name="body_path__get_the_location_of_the_file_the_body_is_in_">body_path - Get the location of the file the body is in.</a></h2>
<p>This method returns the file path to the file the body is located in if the body for this
part is stored in a file. Returns undefined if not.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>$Revision: 1.77 $</p>
</body>
</html>

View File

@ -0,0 +1,383 @@
<!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>GT::Mail::Send - Module to send emails</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#new__constructor_method">new - Constructor method</a></li>
<li><a href="#smtp">smtp</a></li>
<li><a href="#sendmail">sendmail</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Mail::Send - Module to send emails</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Mail::Send;
# $mail_object must be a GT::Mail object
my $send = new GT::Mail::Send (
mail =&gt; $mail_object,
host =&gt; 'smtp.gossamer-threads.com',
debug =&gt; 1
);</pre>
<pre>
$send-&gt;smtp or die $GT::Mail::Send::error;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Mail::Send is an object interface to sending email over either
SMTP or Sendmail. This module is used internally to GT::Mail.</p>
<p>
</p>
<h2><a name="new__constructor_method">new - Constructor method</a></h2>
<p>Returns a new GT::Mail::Send object. You must specify either the smtp host
or a path to sendmail. This method is inherented from GT::Base. The arguments
can be in the form of a hash or hash ref.</p>
<dl>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
Sets the debug level for this instance of GT::Mail::Send.
</dd>
<p></p>
<dt><strong><a name="item_mail">mail</a></strong><br />
</dt>
<dd>
Specify the mail object to use. This must be a GT::Mail object and must contain
an email, either passed in or parsed in.
</dd>
<p></p>
<dt><strong><a name="item_host">host</a></strong><br />
</dt>
<dd>
Specify the host to use when sending by SMTP.
</dd>
<p></p>
<dt><strong><a name="item_port">port</a></strong><br />
</dt>
<dd>
Specify the port to use when sending over SMTP. Defaults to 25.
</dd>
<p></p>
<dt><strong><a name="item_path">path</a></strong><br />
</dt>
<dd>
Specify the path to sendmail when sending over sendmail. If the binary passed in
does not exist, undef will be returned and the error set in GT::Mail::Send::error.
</dd>
<p></p>
<dt><strong><a name="item_flags">flags</a></strong><br />
</dt>
<dd>
Specify the flags used to call sendmail. Defaults to -t -oi -oeq, see the Sendmail
guilde for sendmail for more info on the parameters to sendmail.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="smtp">smtp</a></h2>
<p>Class or instance method. Sends the passed in email over SMTP. If called as a class
method, the parameters passed in will be used to call new(). Returns true on error,
false otherwise.</p>
<p>
</p>
<h2><a name="sendmail">sendmail</a></h2>
<p>Class or instance method. Send the passed in email to sendmail using the specified
path and flags. If called as a class method all additional arguments are passed to the
<code>new()</code> method. Returns true on success and false otherwise.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Send.pm,v 1.53 2004/08/23 20:07:44 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,386 @@
<!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>GT::Plugins - a plugin interface for Gossamer Threads products.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Plugins - a plugin interface for Gossamer Threads products.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Plugins;
$PLUGIN = GT::Plugins-&gt;new('/path/to/plugin/dir');</pre>
<pre>
$PLUGIN-&gt;dispatch(hook_name =&gt; \&amp;code_ref =&gt; @args);
$PLUGIN-&gt;dispatch_method(hook_name =&gt; $self =&gt; method =&gt; @args);</pre>
<p>Old style, now deprecated in favour of the object approach above:</p>
<pre>
use GT::Plugins;</pre>
<pre>
GT::Plugins-&gt;dispatch('/path/to/plugin/dir', hook_name =&gt; \&amp;code_ref =&gt; @args);
GT::Plugins-&gt;dispatch_method('/path/to/plugin/dir', hook_name =&gt; $self =&gt; method =&gt; @args);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The plugin module supports two modes of use. The first mode involves creating
and using a GT::Plugins object upon which plugin dispatch methods may be called
to provide hooks. The second does not use the object, but instead uses class
methods with an extra argument of the plugin path preceding the other
-&gt;<code>dispatch()</code> arguments.</p>
<p>Of the two approaches, the object approach is recommended as it is a) faster,
and b) requires much less value duplication as the plugin directory needs to be
specified only once. The old, class-method-based plugin interface should be
considered deprecated, and all new code should attempt to use the object-based
system.</p>
<p>A dispatch with each of the two interfaces work as follows, with differences in
interfaces as noted:</p>
<ol>
<li></li>
Loads the plugin config file. The actual file access and evaluation will be
cached, but a small amount of extra overhead is required on each dispatch.
This only applies to the deprecated class-method dispatch interface - the
preferred object interface loads the configuration file only once.
<p></p>
<li></li>
Runs any 'PRE' hooks registered in the config file. When using -&gt;dispatch(),
each hook is passed the <code>@args</code> arguments passed into -&gt;dispatch. When using
-&gt;dispatch_method(), both the object ($self) and arguments (@args) are passed
to the hook.
<p>Each plugin hook then has the ability to abort further plugins if desired by
calling <code>$PLUGIN-&gt;action(STOP)</code> (or <code>GT::Plugins-&gt;action(STOP)</code> for
the non-OO interface). STOP is exported by default from the GT::Plugins
module. Performing a STOP will skip both any further 'PRE' hooks and the
original function/method, and will use the hook's return value instead of the
real code's return value.</p>
<p>The current behaviour of 'PRE' hooks ignores the return value of any 'PRE' hook
that does not perform a STOP, however this behaviour <strong>may</strong> change to use the
return value as the arguments to the next PRE hook or actual code called. As
such, it is strongly recommended to return @_ from any 'PRE' hooks.</p>
<p></p>
<li></li>
Assuming <code>-&gt;action(STOP)</code> has not been called, the method
(-&gt;dispatch_method) or code reference (-&gt;dispatch) will be called, and its
return value stored.
<p></p>
<li></li>
Any registered 'POST' hooks registered in the config file will be run. When
using -&gt;dispatch(), the list-context return value of the main code run (or, if
a 'PRE' hook called STOP, the return value of that 'PRE' hook) will be passed
in. When using -&gt;dispatch_method(), the object is additionally passed in as
the first argument.
<p>The list returned by the 'POST' hook will be used as arguments for any
subsequent 'POST' hooks and as the final result returned by the -&gt;<code>dispatch()</code> or
-&gt;<code>dispatch_method()</code> call. There is one exception to this - for
-&gt;<code>dispatch_method()</code> 'POST' hooks, if the first argument of the return value is
the object, it will be removed; this is done to prevent a build-up of excess
objects at the beginning of the 'POST' hook arguments/return values due to
'POST' hooks simply returning @_ unaltered.</p>
<p></p>
<li></li>
The return value of the final 'POST' hook, or, when no post hooks are
configured, of the actual code, is returned as the result of the -&gt;<code>dispatch()</code>
call.
<p></p></ol>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>Also included as part of the plugin system are some modules for web based tools
to manage plugins:</p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Plugins/Manager.html">the GT::Plugins::Manager manpage</a> - Add, remove and edit plugin files.</p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Plugins/Wizard.html">the GT::Plugins::Wizard manpage</a> - Create shell plugins.</p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Plugins/Installer.html">the GT::Plugins::Installer manpage</a> - Used in installing plugins.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2005 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Plugins.pm,v 1.55 2005/04/01 00:16:51 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Plugins/Author.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,397 @@
<!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>/tmp/glist/private/lib/GT/Plugins/Installer.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#install_hooks">install_hooks</a></li>
<li><a href="#install_menu">install_menu</a></li>
<li><a href="#install_options">install_options</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Plugins::Installer</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
$mgr-&gt;install_hooks('PluginName', ['hook_name', 'PRE|POST', 'code']);
$mgr-&gt;install_menu('PluginName', ['menu_name', 'menu_url', 'enabled']);
$mgr-&gt;install_options('PluginName', ['option_key', 'option_val', 'instructions']);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The installer is an object that is passed into plugins during installation.
It provides methods to add hooks, menu options, admin options or copy files
into the users application.</p>
<p>
</p>
<h2><a name="install_hooks">install_hooks</a></h2>
<p><code>install_hooks</code> takes as arguments the plugin name and an array of:</p>
<dl>
<dt><strong><a name="item_hook_name">hook_name</a></strong><br />
</dt>
<dd>
The hook you want to override.
</dd>
<p></p>
<dt><strong><a name="item_pre_2fpost">PRE/POST</a></strong><br />
</dt>
<dd>
Either the string PRE or POST depending on whether the hook should be run
before the main code, or after.
</dd>
<p></p>
<dt><strong><a name="item_code">code</a></strong><br />
</dt>
<dd>
The name of the code to run. It should be Plugins::PACKAGE::YourPluginName::function.
Where PACKAGE is the name of the Gossamer Product the plugin is for. For example
Plugins::GMail::Wap::header
</dd>
<p></p></dl>
<p><code>install_hooks</code> returns 1 on success, undef on failure with the error
message in $GT::Plugins::error.</p>
<p>
</p>
<h2><a name="install_menu">install_menu</a></h2>
<p><code>install_menu</code> takes as arguments the plugin name and an array of:</p>
<dl>
<dt><strong><a name="item_menu_name">menu_name</a></strong><br />
</dt>
<dd>
The name that will show up in the admin menu.
</dd>
<p></p>
<dt><strong><a name="item_menu_url">menu_url</a></strong><br />
</dt>
<dd>
The URL for the menu option.
</dd>
<p></p>
<dt><strong><a name="item_enabled">enabled</a></strong><br />
</dt>
<dd>
Either true or false depending on whether the menu option should be shown.
</dd>
<p></p></dl>
<p><code>install_menu</code> returns 1 on success, undef on failure with the error
message in $GT::Plugins::error.</p>
<p>
</p>
<h2><a name="install_options">install_options</a></h2>
<p><code>install_options</code> takes as arguments the plugin name and an array of:</p>
<dl>
<dt><strong><a name="item_option_key">option_key</a></strong><br />
</dt>
<dd>
This is the key, and is used when accessing the options hash.
</dd>
<p></p>
<dt><strong><a name="item_option_value">option_value</a></strong><br />
</dt>
<dd>
This is the default value.
</dd>
<p></p>
<dt><strong><a name="item_instructions">instructions</a></strong><br />
</dt>
<dd>
A string instruction users on what the plugin does.
</dd>
<p></p></dl>
<p><code>install_options</code> returns 1 on success, undef on failure with the error
message in $GT::Plugins::error.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Installer.pm,v 1.13 2004/08/23 19:54:27 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Plugins/Manager.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Plugins/Wizard.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/RDF.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,582 @@
<!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>GT::SQL - A database independent perl interface</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#creating_a_new_gt__sql_object">Creating a new GT::SQL object</a></li>
<li><a href="#getting_connected">Getting Connected</a></li>
<li><a href="#supported_objects">Supported Objects</a></li>
<li><a href="#table_prefixes">Table Prefixes</a></li>
<li><a href="#query_stack">Query Stack</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL - A database independent perl interface</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::SQL;</pre>
<pre>
my $db = GT::SQL-&gt;new('/path/to/def');
my $table = $db-&gt;table('Links');
my $editor = $db-&gt;editor('Links');
my $creator = $db-&gt;creator('NewTable');
my $html = $db-&gt;html('Links', new CGI);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL is a perl database abstraction layer to relational databases, providing
a native Perl interface rather than a query-based interface.</p>
<p>A GT::SQL object provides the interface to the entire database by providing
objects that are able to perform the work needed.</p>
<p>
</p>
<h2><a name="creating_a_new_gt__sql_object">Creating a new GT::SQL object</a></h2>
<p>There are two ways to get a GT::SQL object. First, you can simply provide the
path to the def file directory where GT::SQL stores all it's information:</p>
<pre>
$db = GT::SQL-&gt;new('/path/to/def');</pre>
<p>or you can pass in a hash or hash ref and specify options:</p>
<pre>
$db = GT::SQL-&gt;new(
def_path =&gt; '/path/to/def',
cache =&gt; 1,
debug =&gt; 1,
subclass =&gt; 1
);</pre>
<p>You must specify def_path. Setting <code>cache =&gt; 1</code> will result in all table
and relation objects being cached, which provides a performance improvement in
any situation where the same table or relation is used again.</p>
<p>Specifying <code>subclass =&gt; 0</code> or <code>subclass =&gt; 1</code> will enable or disable
the ability to subclass any of the objects GT::SQL creates. The default
value is <code>1</code>, and should not normally be changed.</p>
<p>GT::SQL has significant amounts of debugging output that can be enabled by
specifying a value of <code>1</code> to the <code>debug</code> option. Larger values can be
specified for more detailed debugging output, however a level of <code>1</code> is almost
always more than sufficient. The accepted values are as follows:</p>
<dl>
<dt><strong><a name="item_level_0">Level 0</a></strong><br />
</dt>
<dd>
This is the default, no debugging information is printed to stderr. All errors
can be obtained in $GT::SQL::error.
</dd>
<p></p>
<dt><strong><a name="item_level_1">Level 1</a></strong><br />
</dt>
<dd>
All queries will be displayed to stderr. This is the recommended value if
query debugging is desired.
</dd>
<p></p>
<dt><strong><a name="item_level_2">Level 2</a></strong><br />
</dt>
<dd>
Same as level 1, but includes more detailed information. Also, when calling
query_stack you get a stack trace on what generated each query. Not
recommended except when working directly on GT::SQL.
</dd>
<p></p>
<dt><strong><a name="item_level_3">Level 3</a></strong><br />
</dt>
<dd>
Very detailed debug logs including creation and destruction of objects.
query_stack generates a javascript page with query, stack trace, and data dump
of arguments, but can be extremely large. Not recommended except for debugging
GT::SQL internals.
</dd>
<p></p></dl>
<p><strong>Pass in a def path</strong></p>
<pre>
$obj = GT::SQL-&gt;new('/path/to/def/directory');</pre>
<p>This method of calling new is also supported, however has the drawback that
none of the above options can be provided.</p>
<p>
</p>
<h2><a name="getting_connected">Getting Connected</a></h2>
<p>GT::SQL loads the database connection info from database.def which is located
in the defs directory.</p>
<p>To create this file, you call <code>set_connect()</code> as follows:</p>
<pre>
$obj-&gt;set_connect({
driver =&gt; 'mysql',
host =&gt; 'localhost',
port =&gt; 3243,
database =&gt; 'databasename',
login =&gt; 'username',
password =&gt; 'password',
PREFIX =&gt; 'prefix_'
});</pre>
<p>This will test the database information, and save it to the def file. All
future connections will automatically use this connection information.</p>
<p>Not all of the arguments in this hash are necessary; some have reasonable
defaults for the connection.</p>
<dl>
<dt><strong><a name="item_driver">driver</a></strong><br />
</dt>
<dd>
This needs to be the driver that is being used for the connection. The default
for this is <code>mysql</code>. Driver names are case-insensitive. Available drivers
are:
</dd>
<dl>
<dt><strong><a name="item_mysql">MySQL</a></strong><br />
</dt>
<dd>
Driver for MySQL databases. Requires that the DBD::mysql module be installed.
</dd>
<p></p>
<dt><strong><a name="item_pg">Pg</a></strong><br />
</dt>
<dd>
Driver for PostgreSQL databases. Requires that the DBD::Pg module be
installed.
</dd>
<p></p>
<dt><strong><a name="item_mssql">MSSQL</a></strong><br />
</dt>
<dd>
Driver for MSSQL 7.0 and above. Requires that the DBD::ODBC module be
installed.
</dd>
<p></p>
<dt><strong><a name="item_oracle">Oracle</a></strong><br />
</dt>
<dd>
Driver for Oracle 8 and above. Requires the DBD::Oracle module.
</dd>
<p></p></dl>
<dt><strong><a name="item_host">host</a></strong><br />
</dt>
<dd>
This will specify the host to connect to. The default, which is acceptable for
most installations, is <code>localhost</code>.
</dd>
<p></p>
<dt><strong><a name="item_port">port</a></strong><br />
</dt>
<dd>
This is the port on which to connect to the SQL server. The default for this
is to allow the DBI driver to choose the default, which is almost always the
appropriate choice.
</dd>
<p></p>
<dt><strong><a name="item_database">database</a></strong><br />
</dt>
<dd>
This is the database name to use on the SQL server. This is required to
connect. For MSSQL, this is the <em>Data Source</em> name.
</dd>
<p></p>
<dt><strong><a name="item_prefix">PREFIX</a></strong><br />
</dt>
<dd>
This specifies a prefix to use for table names. See the <a href="#table_prefixes">Table Prefixes</a>
section below for more information.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="supported_objects">Supported Objects</a></h2>
<p>The following objects can be obtained through a GT::SQL object:</p>
<dl>
<dt><strong><a name="item_table_2frelation">Table/Relation</a></strong><br />
</dt>
<dd>
To get a table or relation object for working with SQL tables, you should call:
</dd>
<dd>
<pre>
my $table = $db-&gt;table('table_name');</pre>
</dd>
<dd>
<p>or for a table join:</p>
</dd>
<dd>
<pre>
my $relation = $db-&gt;table('table_name', 'other_table');</pre>
</dd>
<dd>
<p>See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Table.html">the GT::SQL::Table manpage</a> for more information on how to use a table object.</p>
</dd>
<p></p>
<dt><strong><a name="item_creator">Creator</a></strong><br />
</dt>
<dd>
To create new tables, you need to use a creator. You can get one by calling:
</dd>
<dd>
<pre>
my $creator = $db-&gt;creator('new_table');</pre>
</dd>
<dd>
<p>where <code>new_table</code> is the name of the table you wish to create. See
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Creator.html">the GT::SQL::Creator manpage</a> for more information on how to use a creator object.</p>
</dd>
<p></p>
<dt><strong><a name="item_editor">Editor</a></strong><br />
</dt>
<dd>
To edit existing tables (i.e. add/drop/change columns, add/drop indexes, etc.)
you need an editor object:
</dd>
<dd>
<pre>
my $editor = $db-&gt;editor('existing_table');</pre>
</dd>
<dd>
<p>where <code>existing_table</code> is the name of the table you wish the modify. See
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Editor.html">the GT::SQL::Editor manpage</a> for more information on how to use an editor object.</p>
</dd>
<p></p>
<dt><strong><a name="item_html">HTML</a></strong><br />
</dt>
<dd>
To get an html object for generating forms and html output, you need to pass in
the table/relation object you want to work with, and a cgi object:
</dd>
<dd>
<pre>
my $html = $db-&gt;html($table, $cgi);</pre>
</dd>
<dd>
<p>The html object uses information found in CGI to set values, etc. See
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Display/HTML.html">the GT::SQL::Display::HTML manpage</a> for more information on how to use a html object.</p>
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="table_prefixes">Table Prefixes</a></h2>
<p>GT::SQL supports the concept of table prefixes. If you specify a prefix using
the accessor, it is saved in the database.def file and will be used in all
future calls to table(), <code>editor()</code> and creator().</p>
<p>To set a prefix:</p>
<pre>
$db-&gt;prefix(&quot;foo&quot;);</pre>
<p>to get the current prefix:</p>
<pre>
my $prefix = $db-&gt;prefix;</pre>
<p>What this will do is transparently prepend <code>foo</code> to the beginning of every
table name. This means anywhere you access the table <code>bar</code>, the actual table
stored on the SQL server will be <code>foobar</code>. Note that the prefix should <strong>not</strong>
be included when getting table/creator/editor/etc. objects - the prefix is
handled completely transparently to all public GT::SQL functionality.</p>
<p>
</p>
<h2><a name="query_stack">Query Stack</a></h2>
<p>To display a list of all raw SQL queries sent to the database you can use:</p>
<pre>
my @queries = $db-&gt;query_stack;</pre>
<p>or to have them formatted try</p>
<pre>
print $db-&gt;query_stack_disp;</pre>
<p>which will join them up, displayed nicely. This is also available as a class
method:</p>
<pre>
print GT::SQL-&gt;query_stack_disp;</pre>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Table.html">the GT::SQL::Table manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Editor.html">the GT::SQL::Editor manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Creator.html">the GT::SQL::Creator manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Types.html">the GT::SQL::Types manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Admin.html">the GT::SQL::Admin manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Display/HTML.html">the GT::SQL::Display::HTML manpage</a></p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: SQL.pm,v 1.111 2005/04/14 20:22:37 alex Exp $</p>
</body>
</html>

View File

@ -0,0 +1,411 @@
<!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>GT::SQL::Admin - instant admin for any sql table.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#usage">Usage</a></li>
<li><a href="#subclassing_the_admin">Subclassing the admin</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Admin - instant admin for any sql table.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $cgi = new GT::CGI;
my $db = new GT::SQL '/path/to/def';
my $admin = new GT::SQL::Admin;
if ($admin-&gt;for_me($cgi)) {
$admin-&gt;process ( db =&gt; $db, cgi =&gt; $cgi );
}</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL::Admin provides an easy way to build a table/relation
management application. It provides all the HTML and code to
easily:</p>
<pre>
1. Add records
2. Delete records
3. Modify records
4. Search records
5. Add columns
6. Drop columns
7. Alter table properties
8. Import data
9. Export data</pre>
<p>all in about 6 lines of code.</p>
<p>
</p>
<h2><a name="usage">Usage</a></h2>
<p>To use GT::SQL::Admin you need to pass in an existing
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL.html">the GT::SQL manpage</a> object, and a <a href="glist.cgi?do=admin_gtdoc&topic=/GT/CGI.html">the GT::CGI manpage</a> object.</p>
<p>In it's simplest usage, you can simply call:</p>
<pre>
my $admin = new GT::SQL::Admin;
$admin-&gt;process ( db =&gt; $db, cgi =&gt; $cgi );</pre>
<p>and the admin module will figure out what was requested and display
the appropriate screen. There is a $admin-&gt;for_me method that will
look to see if the cgi object contains something for the admin
to do, returning 1 if yes, 0 otherwise. You would then do:</p>
<pre>
my $cgi = new GT::CGI;
my $admin = new GT::SQL::Admin;
if ($admin-&gt;for_me($cgi)) {
$admin-&gt;process ( db =&gt; $db, cgi =&gt; $cgi );
}</pre>
<p>You can also call any of the methods individually. You can create an
add form like:</p>
<pre>
$admin-&gt;add_form;</pre>
<p>and it will be printed to STDOUT.</p>
<p>To change the look of a page, you can pass in strings or code refs
to display any of the following items:</p>
<pre>
start_html
header
start_form
end_form
footer
end_html</pre>
<p>and the admin will use your html/code when displaying. You can also pass
in to process:</p>
<pre>
record =&gt; 'MyObject'</pre>
<p>and the admin will use that string when displaying titles like 'Add MyObject'.
If you don't specify, it will default to the name of the table.</p>
<p>
</p>
<h2><a name="subclassing_the_admin">Subclassing the admin</a></h2>
<p>You can enhance the functionality of an admin quite easily. By default
GT::SQL::Admin expects to find a GT::SQL object, a GT::CGI object, and uses
internally a GT::SQL::Display::HTML object for any form/record html
generation.</p>
<p>Alternatively, you can subclass one or more of the above and use your
own libraries. For instance, if you wanted to expand the form generation,
you could subclass the GT::SQL::Display::HTML object and override the <code>display()</code>
and <code>form()</code> method with your own.</p>
<p>The admin will pass in a 'mode' to both display and form that will tell
you what it is using the form for. This can be one of:</p>
<pre>
search_form
search_results
add_form
add_success
delete_search_form
delete_search_results
download_file
modify_search_form
modify_search_results
modify_form
modify_success
modify_multi_search_results
modify_multi_results_norec
modify_multi_result_changed
modify_multi_results_err</pre>
<p>There are also several options that can be passed in. See the
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Display/HTML.html">the GT::SQL::Display::HTML manpage</a> module for more information.
</p>
<p>Also be sure to read about subclassing in <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL.html">the GT::SQL manpage</a>.
</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a>
</p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Admin.pm,v 1.146 2005/03/15 00:35:29 brewt Exp $
</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Base.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,390 @@
<!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>GT::SQL::Condition - Creates complex where clauses</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsys">SYNOPSYS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Condition - Creates complex where clauses</p>
<p>
</p>
<hr />
<h1><a name="synopsys">SYNOPSYS</a></h1>
<pre>
my $cond = GT::SQL::Condition-&gt;new(Column =&gt; LIKE =&gt; 'foo%');
print $cond-&gt;sql;</pre>
<pre>
my $cond = GT::SQL::Condition-&gt;new(
Column =&gt; LIKE =&gt; 'foo%',
Column2 =&gt; '&lt;' =&gt; 'abc'
);
$cond-&gt;bool('OR');
print $cond-&gt;sql;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The condition module is useful for generating complex SQL WHERE clauses. At
it's simplest, a condition is composed of three parts: column, condition and
value.</p>
<p>Here are some examples.</p>
<p>To find all users with a first name that starts with Alex use:</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(FirstName =&gt; LIKE =&gt; 'Alex%');</pre>
<p>To find users with first name like alex, <strong>and</strong> last name like krohn use:</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(
FirstName =&gt; LIKE =&gt; 'Alex%',
LastName =&gt; LIKE =&gt; 'Krohn%'
);</pre>
<p>To find users with first name like alex <strong>or</strong> last name like krohn use:</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(
FirstName =&gt; LIKE =&gt; 'Alex%',
LastName =&gt; LIKE =&gt; 'Krohn%'
);
$cond-&gt;bool('OR');</pre>
<p>You may also specify this as:</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(
FirstName =&gt; LIKE =&gt; 'Alex%',
LastName =&gt; LIKE =&gt; 'Krohn%',
'OR'
);</pre>
<p>Now say we wanted something a bit more complex that would normally involve
setting parentheses. We want to find users who have either first name like alex
or last name like krohn, and whose employer is Gossamer Threads. We could use:</p>
<pre>
my $cond1 = GT::SQL::Condition-&gt;new(
'FirstName', 'LIKE', 'Alex%',
'LastName', 'LIKE', 'Krohn%'
);
$cond1-&gt;bool('or');
my $cond2 = GT::SQL::Condition-&gt;new(
$cond1,
Employer =&gt; '=' =&gt; 'Gossamer Threads'
);</pre>
<p>By default, all values are quoted, so you don't need to bother using any quote
function. If you don't want something quoted (say you want to use a function
for example), then you pass in a reference.</p>
<p>For example, to find users who have a last name that sounds like 'krohn', you
could use your SQL engines SOUNDEX function:</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(LastName =&gt; '=' =&gt; \&quot;SOUNDEX('krohn')&quot;);</pre>
<p>and the right side wouldn't be quoted.</p>
<p>You can also use a condition object to specify a list of multiple values, which
will become the SQL 'IN' operator. For example, to match anyone with a first
name of Alex, Scott or Jason, you can do:</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(FirstName =&gt; IN =&gt; ['Alex', 'Scott', 'Jason']);</pre>
<p>which will turn into:</p>
<pre>
FirstName IN ('Alex', 'Scott', 'Jason')</pre>
<p>Note that when using multiple values, you can use '=' instead of 'IN'. Empty
lists will be treated as an impossible condition (1 = 0). This is primarily
useful for list handling list of id numbers.</p>
<p>To match NULL values, you can use <code>undef</code> for the value passed to the <code>add()</code>
method. If specifying '=' as the operator, it will automatically be changed to
'IS':</p>
<pre>
$cond-&gt;add(MiddleName =&gt; '=' =&gt; undef);</pre>
<p>becomes:</p>
<pre>
MiddleName IS NULL</pre>
<p>To negate your queries you can use the <code>not</code> function.</p>
<pre>
my $cond = GT::SQL::Condition-&gt;new(a =&gt; '=' =&gt; 5);
$cond-&gt;not;</pre>
<p>would translate into NOT (a = '5'). You can also do this all on one line like:</p>
<pre>
print GT::SQL::Condition-&gt;new(a =&gt; '=' =&gt; '5')-&gt;not-&gt;sql;</pre>
<p>This returns the sql right away.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Condition.pm,v 1.44 2004/10/12 17:54:30 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,553 @@
<!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>GT::SQL::Creator - an object to create SQL tables.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#cols">cols</a></li>
<li><a href="#pk">pk</a></li>
<li><a href="#ai">ai</a></li>
<li><a href="#index">index</a></li>
<li><a href="#unique">unique</a></li>
<li><a href="#fk">fk</a></li>
<li><a href="#search_driver">search_driver</a></li>
<li><a href="#create">create</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Creator - an object to create SQL tables.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $creator = $DB-&gt;creator('Newtable');
$creator-&gt;cols(
col1 =&gt; {
pos =&gt; 1
type =&gt; 'CHAR',
size =&gt; 50
},
col2 =&gt; {
pos =&gt; 2,
type =&gt; 'INT',
not_null =&gt; 1
}
);
$creator-&gt;pk('col2');
$creator-&gt;ai('col2');
$creator-&gt;create or die &quot;Unable to create: $GT::SQL::error&quot;;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>A creator object is used to build new SQL tables.</p>
<p>To get a new creator object, you need to call <code>creator()</code> from an existing
GT::SQL object.</p>
<p>The object that is returned has methods to set up your table. You will need to
call this method for each table you want to create.</p>
<pre>
$creator = $obj-&gt;creator($table);</pre>
<p>You must pass in the name of the table you want to create. This means if you
have a table named <code>MyTable</code> you must call <code>-&gt;creator</code> with <code>'MyTable'</code>
as the argument.</p>
<pre>
$creator = $obj-&gt;creator('MyTable');</pre>
<p>From this point you can call create methods on your creator object to define
and create your table.</p>
<p>
</p>
<h2><a name="cols">cols</a></h2>
<p><em>cols</em> is used to define the columns that will be in the new table by setting
properties such as the type, whether it allows null values, unsigned etc.</p>
<p>For detailed information on the types and options accepted, please see
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Types.html">the GT::SQL::Types manpage</a>. The following describes the options accepted that do not
directly affect the underlying database:</p>
<dl>
<dt><strong><a name="item_values">values</a></strong><br />
</dt>
<dd>
This specifies the values for the <em>ENUM</em> column type. If you are using an
<em>ENUM</em> this must be set. The value for this should be an array reference of
the possible values for the <em>ENUM</em> column. The values in the array that is
passed in will be quoted by DBI's quote method.
</dd>
<p></p>
<dt><strong><a name="item_regex">regex</a></strong><br />
</dt>
<dd>
This is a regex that the value must pass before being inserted
into the database.
</dd>
<p></p>
<dt><strong><a name="item_form_display">form_display</a></strong><br />
</dt>
<dd>
This is a ``pretty name'' that will be used by the HTML module
for creating attractive forms automatically.
</dd>
<p></p>
<dt><strong><a name="item_form_size">form_size</a></strong><br />
</dt>
<dd>
This is the form field length to be used by the HTML module.
</dd>
<p></p>
<dt><strong><a name="item_form_type">form_type</a></strong><br />
</dt>
<dd>
This is the type of form to use by the HTML module: select, checkbox
radio, text, textarea or hidden.
</dd>
<p></p>
<dt><strong><a name="item_form_names">form_names</a></strong><br />
</dt>
<dd>
This is for multi select or checkboxes and is an array ref of names
that get displayed.
</dd>
<p></p>
<dt><strong><a name="item_form_values">form_values</a></strong><br />
</dt>
<dd>
This is for multi select or checkboxes and is an array ref of the
actual values that will be stored in the database.
</dd>
<p></p>
<dt><strong><a name="item_time_check">time_check</a></strong><br />
</dt>
<dd>
This is only useful for TIMESTAMP fields. If set to 1, the module
will not allow you to update a record which has an older timestamp
then what is in the database. This is very helpful for protecting
against multiple updates.
</dd>
<p></p>
<dt><strong><a name="item_weight">weight</a></strong><br />
</dt>
<dd>
By giving an item a weight, GT::SQL will maintain a search index
table, and use that search index table when called using query.
This is only useful for indexing large text fields and should not
be used normally. The higher the weight, the more influence that
column will have on the result. So if a Title was set to weight
3 and a Description to weight 1, then when doing a search, a match
in the title would make the result appear before a match in the
description.
</dd>
<p></p></dl>
<p>So an example would look like:</p>
<pre>
$creator-&gt;cols(
$col1 =&gt; {
type =&gt; 'ENUM',
values =&gt; ['val1', 'val2' ... ],
not_null =&gt; 1
},
$col2 =&gt; {
...
}
);</pre>
<p>Sets the relations columns as specified via method
parameters. The only required key for the has is type.
However some column types require other values be set
such as <em>ENUM</em> requires you specify the values.</p>
<p>
</p>
<h2><a name="pk">pk</a></h2>
<p><code>pk</code> lets you specify the primary keys for the current table.
This method can be called with an array of primary key columns
in which case all the specified column names in the array will
make up the primary keys. If you call it with a single scalar
value this is assumed to be the primary key for the table.</p>
<pre>
$creator-&gt;pk($field1, $field2, ...);</pre>
<p>
</p>
<h2><a name="ai">ai</a></h2>
<p>This specifies the auto increment column for the current table.
There can be only one auto increment column per table, it must
be a numeric type, it must be not null and it must be the
primary key. This limitation is checked when you call create.
If it is not a numeric column type you will get a fatal error
when you call create. If any of the other limitations fail
the creator class will correct.</p>
<p>
</p>
<h2><a name="index">index</a></h2>
<p><code>index</code> allows you to specify the name and the columns for you
table indexes.</p>
<p>There are two ways to call this method.</p>
<p>You can set up all your indexes at once by calling it with
hash reference like this:</p>
<pre>
$creator-&gt;index({
$index1 =&gt; [field1, field2],
$index2 =&gt; [field3, field4]
});</pre>
<p>The keys to this hash reference are the index names and
the values are an array reference containing the columns
that are part of the named index. The order for these
columns are maintained during the create.</p>
<p>You can also pass in one index at a time like this;</p>
<pre>
$creator-&gt;index($index_name, $col1, ..., $coln);</pre>
<p>The first argument is the name of the index and all the
rest are treated as columns that are part of this index.
Again the order of the columns are maintained.</p>
<p>
</p>
<h2><a name="unique">unique</a></h2>
<p>The <code>unique</code> method allows you to specify the unique
indexes for the current table. This method takes the
same arguments as the <code>index</code> method.</p>
<p>
</p>
<h2><a name="fk">fk</a></h2>
<p><code>fk</code> allows you to specify foreign key relations for your
tables. You CAN NOT specify foreign keys for tables that
have not been created yet. There are two ways to pass in
arguments to <code>fk</code>. The first way is passing in a hash reference.</p>
<pre>
$creator-&gt;fk({
$FOREIGN_TABLE_NAME =&gt;
{
$LOCAL_TABLE_COL_1 =&gt; $FOREIGN_TABLE_COL_1,
...
$LOCAL_TABLE_COL_n =&gt; $FOREIGN_TABLE_COL_n
}
});</pre>
<p>The keys to the hash are the names of the tables you are relating to.
The values are a hash reference that contain the name of the current
tables columns as the keys and the name of the foreign tables columns
that we are relating to as the values.</p>
<p>You cannot relate fields to your self. You also need to be careful
not to create circular references. This is checked when you call this
method. If there is a circular reference detected you will receive a
fatal error.</p>
<p>Foreign keys currently effect selects only.</p>
<p>
</p>
<h2><a name="search_driver">search_driver</a></h2>
<p>This affects how the weighted records are indexed. By default the
system will attempt to use best driver for the DBMS. However, if
you'd like to force the indexing system to an alternative type, such
as for MYSQL you can use this.</p>
<p>* note: though the MYSQL driver is faster, the internal indexing system
has better support for phrase searching and keyword searching.</p>
<p>To set the driver, call <code>search_driver</code> with the appropriate driver
name. The following example will force the system into using the
internally implemented indexing scheme.</p>
<pre>
$creator-&gt;search_driver('INTERNAL');</pre>
<p>Currently, the only other valid option is ``MYSQL''.</p>
<p>-note-</p>
<p>The MYSQL driver occasionally behaves oddly with a small number of
records. In that case, set the search scheme to ``INTERNAL''.</p>
<p>
</p>
<h2><a name="create">create</a></h2>
<p>This is the method you call to create your table after you have specified
all your table definitions. Several checks are made when this method is
called to ensure the table is created correctly.</p>
<p>One of the things that is done is checking to see that the table you are
trying to create does not exist. If the table does exist <em>create</em> will
return undefined and set the error in $GT::SQL::error.</p>
<p>You can specify to have <code>create</code> drop the table by passing in ``force''.</p>
<pre>
$creator-&gt;create('force');</pre>
<p>-or-</p>
<pre>
$creator-&gt;create;</pre>
<p><code>create</code> returns true on success and undef on failure.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Creator.pm,v 1.74 2004/09/22 02:43:29 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Display/HTML.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,289 @@
<!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>/tmp/glist/private/lib/GT/SQL/Display/HTML/Relation.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
<p># Options for display forms/views:
# hide_timestamp =&gt; 1 # Do not display timestamp fields.
# search_opts =&gt; 1 # Add search options boxes.
# multiple =&gt; 1 # Prepend $multiple- to column names.
# defaults =&gt; 1 # Use .def defaults.
# values =&gt; {} # hash ref of values to use (overrides input)
# table =&gt; 'string' # table properties, defaults to 0 border.
# tr =&gt; 'string' # table row properties, defaults to none.
# td =&gt; 'string' # table cell properties, defaults to just aligns.
# extra_table =&gt; 0 # disable wrap form in extra table for looks.
# col_font =&gt; 'string' # font to use for columns, defaults to $FONT.
# val_font =&gt; 'string' # font to use for values, defaults to $FONT.
# hide =&gt; [] # display fields as hidden tags.
# view =&gt; [] # display fields as html with hidden tags as well.
# skip =&gt; [] # don't display array of column names.
</p>
</body>
</html>

View File

@ -0,0 +1,287 @@
<!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>/tmp/glist/private/lib/GT/SQL/Display/HTML/Table.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
<p># Options for display forms/views:
# hide_timestamp =&gt; 1 # Do not display timestamp fields.
# search_opts =&gt; 1 # Add search options boxes.
# multiple =&gt; 1 # Prepend $multiple- to column names.
# defaults =&gt; 1 # Use .def defaults.
# values =&gt; {} # hash ref of values to use (overrides input)
# table =&gt; 'string' # table properties, defaults to 0 border.
# tr =&gt; 'string' # table row properties, defaults to none.
# td =&gt; 'string' # table cell properties, defaults to just aligns.
# extra_table =&gt; 0 # disable wrap form in extra table for looks.
# col_font =&gt; 'string' # font to use for columns, defaults to $FONT.
# val_font =&gt; 'string' # font to use for values, defaults to $FONT.
# hide =&gt; [] # display fields as hidden tags.
# view =&gt; [] # display fields as html with hidden tags as well.
# skip =&gt; [] # don't display array of column names.</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/MSSQL.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/MYSQL.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/ORACLE.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/PG.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/Types.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/debug.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Driver/sth.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,494 @@
<!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>GT::SQL::Editor - an interface to modify an SQL table.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#add_col">add_col</a></li>
<li><a href="#drop_col">drop_col</a></li>
<li><a href="#alter_col">alter_col</a></li>
<li><a href="#add_unique">add_unique</a></li>
<li><a href="#drop_unique">drop_unique</a></li>
<li><a href="#add_index">add_index</a></li>
<li><a href="#drop_index">drop_index</a></li>
<li><a href="#add_pk">add_pk</a></li>
<li><a href="#drop_pk">drop_pk</a></li>
<li><a href="#add_fk">add_fk</a></li>
<li><a href="#drop_fk">drop_fk</a></li>
<li><a href="#drop_table">drop_table</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Editor - an interface to modify an SQL table.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $editor = $DB-&gt;editor('Table');
$editor-&gt;add_col(Foo =&gt; { size =&gt; 20, type =&gt; 'int' });
$editor-&gt;export_data('/tmp/foo.txt');</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL::Editor is an easy way to do a lot of table maintenance
functions like:</p>
<p>* Adding columns
* Dropping columns
* Changing columns
* Altering keys
* Importing data
* Dropping data</p>
<p>To get an editor object, you simply call <code>editor</code> from a
GT::SQL object, and specify the tablename you want to edit:</p>
<pre>
$editor = $db-&gt;editor('TableName');</pre>
<p>Note: You can not use Editor with relations, only tables.</p>
<p>
</p>
<h2><a name="add_col">add_col</a></h2>
<p>This method allows you to add a column to the current table.
All attributes for the column are passed in a single hash.</p>
<pre>
$editor-&gt;add_col($col_name,
{
size =&gt; 20,
type =&gt; 'int',
view_size =&gt; 20,
nice_name =&gt; &quot;my col&quot;,
regex =&gt; 'myregex'
}
);</pre>
<p>The same rules apply to this method that apply when you
define a column for creating a table. You must specify the
type.</p>
<p>
</p>
<h2><a name="drop_col">drop_col</a></h2>
<p>This method drops a column from the current table. Checks
are made to ensure the column is not linked to by a foreign
key relation.</p>
<pre>
$editor-&gt;drop_col($col_name);</pre>
<p>-or-</p>
<pre>
$editor-&gt;drop_col($col_name, &quot;remove&quot;);</pre>
<p>If you just specify the column name <code>drop_col</code> will check if
the column is referenced in a foreign key relation. If it
is <code>drop_col</code> will return undef and set the error message in
$GT::SQL::error. If it is not the column will be dropped.</p>
<p>If you specify ``remove'' <code>drop_col</code> will remove all foreign
key relations that point to the specified column.</p>
<p>If the specified column is itself a foreign key relation, the relation will be
dropped.</p>
<p>
</p>
<h2><a name="alter_col">alter_col</a></h2>
<p>This allows you to make changes to a columns type, null status,
etc..</p>
<pre>
$editor-&gt;alter_col($column_name,
{
size =&gt; 20,
type =&gt; 'int'
});</pre>
<p>The first argument is the column name the second is the definitions.
The column definitions are exactly the same as the column
definitions from the create. The type must be specified.</p>
<p>You can not add attributes to the column in this way.
You must specify the original definitions along with the
changes you need to make.</p>
<p>
</p>
<h2><a name="add_unique">add_unique</a></h2>
<p>This allows you to add a unique index to the current table.
If the name of the unique index is the same as another
index you <code>add_unique</code> will return undef and set the error
in $GT::SQL::error.</p>
<pre>
$editor-&gt;add_unique($index_name =&gt; [ $field1, $field2 .. ]);</pre>
<p>The name of the new index is the first argument. The second argument
is an array reference containing the columns that will be indexed.
The order of the columns are maintained for the unique index.
If you specify an index that has data in it that is not unique
(yes we do a select on the database) <code>add_unique</code> will return
an error and set the error in $GT::SQL::error.</p>
<p>
</p>
<h2><a name="drop_unique">drop_unique</a></h2>
<p>This method allows you to drop a unique index for the current
table. If the unique index does not exist <code>drop_unique</code> will
return undef and set the error in $GT::SQL::error. <code>drop_unique</code>
will also check to make sure dropping the unique index will not
cause problems for the database structure. If dropping the unique
index will cause a problem <code>drop_unique</code> will return undef and set
the error in $GT::SQL::error.</p>
<pre>
$editor-&gt;drop_unique($index_name);</pre>
<p>$index_name should be the name of the unique index to drop.</p>
<p>
</p>
<h2><a name="add_index">add_index</a></h2>
<p>This takes the same arguments as <code>add_unique</code> and return the same thing.
The only difference is <code>add_index</code> has no reason to check the content of
the current table because indexes are not unique. unique indexes are :)</p>
<pre>
$editor-&gt;add_index($index_name =&gt; [ $field1, $field2 .. ]);</pre>
<p>
</p>
<h2><a name="drop_index">drop_index</a></h2>
<p>This method drops the specified index from the current table.
<code>drop_index</code> will check to make sure no problems are caused from
dropping the index. If there are <code>drop_index</code> will return undef
and set the error in $GT::SQL::error.</p>
<pre>
$editor-&gt;drop_index($index_name);</pre>
<p>$index_name should be the name of the index to drop.</p>
<p>
</p>
<h2><a name="add_pk">add_pk</a></h2>
<p>This method allows you to add a primary key to the current
database.</p>
<pre>
$editor-&gt;add_pk($field1, $field2, ...);</pre>
<p>If there is already a primary key in the database <code>add_pk</code>
will drop the key and add the this new one. The table
will be check to make sure this change does not create problems
for the table. I problem is auto increment not being the primary
key anymore. If there is a problem this function returns undef
and stores the error in $GT::SQL::error.</p>
<p>
</p>
<h2><a name="drop_pk">drop_pk</a></h2>
<p>This method drops the current primary key. If there is no primary
key to drop it returns undef and sets the error in $GT::SQL::error.</p>
<pre>
$editor-&gt;drop_pk;</pre>
<p>If dropping the primary key will cause problems for the database
this method will return undef and set the error in $GT::SQL::error.</p>
<p>
</p>
<h2><a name="add_fk">add_fk</a></h2>
<p>This method allows you to add foreign key relations to the current
table.</p>
<pre>
$editor-&gt;add_fk($RELATION_NAME, { $SOURCE_FIELD_1 =&gt; $TARGET_FIELD });</pre>
<p>You can not link your foreign key to tables that do not exist. Also the
columns types and lengths for the two columns must be the same.
Circularity is not allowed either. That is a set of foreign keys can not
end up pointing back at the same table they started at. All of these things
are checked when this is added. If anything does not match this method returns
undef and sets the error in $GT::SQL::error.</p>
<p>
</p>
<h2><a name="drop_fk">drop_fk</a></h2>
<p>This method drops the specified foreign key relation.</p>
<pre>
$editor-&gt;drop_fk($table);</pre>
<p>$table should be the name of the foreign table the foreign
key points to.</p>
<p>
</p>
<h2><a name="drop_table">drop_table</a></h2>
<p>This method drops the current table. If there are any foreign keys
pointing to this table this method will fail and return undef. The error
will be set in $GT::SQL::error.</p>
<pre>
$editor-&gt;drop_table;</pre>
<p>-or-</p>
<pre>
$editor-&gt;drop_table(&quot;remove&quot;);</pre>
<p>If the first argument to this method is remove it will remove all
the foreign key relations that point to this table.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Editor.pm,v 1.76 2005/04/27 22:53:24 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,404 @@
<!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>GT::SQL::File - adds file upload and download abilities to GT::SQL</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<ul>
<li><a href="#creating_a_new_file_column">Creating a new FILE Column</a></li>
<li><a href="#inserting_into_the_column">Inserting into the Column</a></li>
<li><a href="#retreiving_from_column">Retreiving from Column</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::File - adds file upload and download abilities to GT::SQL</p>
<p>GT::SQL::File::Fh - basic file object</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL::File is not created directly by the user. This module is an
internal module for GT::SQL to provide the abilty to upload/download
files into a database column (or so it seems).</p>
<p>GT::SQL::File::Fh is often accessed by the user as well as created
by the user whenever the user wants to store a file in the database.</p>
<p>
</p>
<h2><a name="creating_a_new_file_column">Creating a new FILE Column</a></h2>
<p>When a new table is created or a column is converted into 'FILE'
type, two things are created. First a column of type text which will
save the name of the file that is being stored. Secondly, a
piggy-back table will be greated under the name
``parent_table_name_File''. This new table will store the location of
the uploaded/stored file and various associated file attributes.</p>
<p>To create a new file table, include a column something like the
following.</p>
<pre>
File_Col_Name =&gt; {</pre>
<pre>
# common parameters
pos =&gt; 2,
type =&gt; 'FILE',</pre>
<pre>
# location of the directory where
# all the files should be saved
file_save_in =&gt; '/tmp',</pre>
<pre>
# the method all the files are saved
# 'hashed', or 'simple'
#
# Defaults to hashed, and stores files in:
# file_save_in/hashed_letter/ID
# Simple stores files in:
# file_save_in/ID_OwnName.OwnExt
file_save_scheme =&gt; 'hashed',
} ...</pre>
<p>
</p>
<h2><a name="inserting_into_the_column">Inserting into the Column</a></h2>
<p>Once you have the table created, to insert:</p>
<pre>
# Include all the modules
use GT::SQL;
use GT::SQL::File;
# First create a file object pointing to the file
$f = GT::SQL::File-&gt;open('/path/to/file.txt');
# Then create a table object
$DB = GT::SQL-&gt;new('path/to/defs');
$tbl = $DB-&gt;table();
# Create the record
# the file field can also be GT::CGI::Fh type
$rec = {
File_Column =&gt; $f,
# ... and all the other columns
};</pre>
<p># optionally, if you know the path to the file, you can provide
# a scalar ref of the path and the module will autoload
# the values
# simple scalar values will be dropped
$rec = {
File_Column =&gt; \``/path/to/file.txt''
# ... and all the other columns
};
</p>
<pre>
# Then to store the file
$id = $tbl-&gt;add( $rec );</pre>
<p>
</p>
<h2><a name="retreiving_from_column">Retreiving from Column</a></h2>
<p>When a file has been stored. A standard select will only return
the name of the file.</p>
<p>To get a filehandle, taking the previous example, if we know the
unique id, you can do the following.</p>
<pre>
$fh = $tbl-&gt;file_info( 'File_Column', $id );</pre>
<p>You can use this file handle just like any other, however hidden
behind are special functions that can be used as follows:</p>
<pre>
print &quot;Content-type: &quot;, $fh-&gt;File_MimeType(), &quot;\n\n&quot;;
print &lt;$fh&gt;;</pre>
<p>The following is a partial list of special functions you may access.</p>
<pre>
Method Returns
------ -------
File_Name the basic filename
File_Directory path to the file
File_MimeType mimetype of the file
File_Size site of the file
File_RelativePath the permuted file and directory without root
File_URL if possible, the URL to the requested file</pre>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: File.pm,v 1.60 2004/08/28 03:53:43 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Monitor.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,601 @@
<!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>GT::SQL::Relation - manage multiple table joins</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#how_it_works">How it works</a></li>
<li><a href="#select_statements">SELECT statements</a></li>
<li><a href="#select_options">SELECT options</a></li>
<li><a href="#listing_the_relation_columns">Listing the relation columns</a></li>
<li><a href="#relation_primary_key">Relation primary key</a></li>
<li><a href="#foreign_keys_management">Foreign keys management</a></li>
<li><a href="#inserting_data">Inserting data</a></li>
<li><a href="#deleting_data">Deleting data</a></li>
<li><a href="#updating_records">Updating records</a></li>
<li><a href="#selecting_records">Selecting Records</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Relation - manage multiple table joins</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $relation = $DB-&gt;table('Company', 'Employees');
my $sth = $relation-&gt;select( {
Company.Name =&gt; 'Gossamer Threads',
Employees.Name =&gt; 'Alex Krohn'
}, ['Employees.Salary', 'Company.City'] );
my ($salary, $city) = $sth-&gt;fetchrow_array;
print &quot;Alex works in $city and earns $salary!\n&quot;;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module aims at emulating a set of tables that are related to each other
via the use of foreign keys just as if it was one big table.</p>
<p>The module interface should be as compatible as possible with GT::SQL::Table,
thus you should be familiar with GT::SQL::Table before even reading this.</p>
<p>This documentation explains the differences between GT::SQL::Relation and
GT::SQL::Table and how the module internally works as well.</p>
<p>
</p>
<h2><a name="how_it_works">How it works</a></h2>
<p>GT::SQL supports the concept of foreign keys (also known as external
references). Basically, two tables that are linked together using external
references can look like that:</p>
<pre>
.-------------. .---------.
| EMPLOYEE | | COMPANY |
`-------------' `---------'
| ID | .---&gt;ID |
| COMPANY_ID ----' | NAME |
| NAME | `---------'
| SALARY |
`-------------'</pre>
<p>In this example, the COMPANY_ID attribute relates the fact that a an EMPLOYEE
belongs to such or such COMPANY.</p>
<p>Utilizing a Relation object can make these tables look like that:</p>
<pre>
.----------------------.
| EMPLOYEE-COMPANY |
`----------------------'
| EMPLOYEE.ID |
| EMPLOYEE.COMPANY_ID |
| EMPLOYEE.NAME |
| EMPLOYEE.SALARY |
| COMPANY.NAME |
`----------------------'</pre>
<p>The first thing that can be seen from there is that COMPANY.ID has disappeared
from this ``Virtual'' table.</p>
<p>Indeed, as for a given ``joined'' record this value must be the same in both
tables, representing the values twice would have been a useless source of
confusion.</p>
<p>
</p>
<h2><a name="select_statements">SELECT statements</a></h2>
<p>Selecting from a Relation object is pretty simple using the GT::SQL module. As
the interface is (almost) the same as <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Table.html">the GT::SQL::Table manpage</a>, the GT::SQL wrapper
returns Table or Relation objects depending on the arguments that are passed to
table.</p>
<pre>
# This gives me a GT::SQL::Table object for
# the EMPLOYEE table.
my $emp = $sql-&gt;table('EMPLOYEE');</pre>
<pre>
# This gives me a GT::SQL::Relation object for
# the relation EMPLOYEE-COMPANY tables
my $emp_cmp = $sql-&gt;table('EMPLOYEE','COMPANY');</pre>
<p>From there, performing a select is pretty simple:</p>
<pre>
# select all the people from a real cool company
my $sth = $emp_cmp-&gt;select( { COMPANY.NAME =&gt; &quot;Gossamer Threads&quot; } )</pre>
<p>Internally, the generated SQL query would look like:</p>
<pre>
SELECT EMPLOYEE.ID, EMPLOYEE.COMPANY_ID, EMPLOYEE.NAME
EMPLOYEE.SALARY, COMPANY.NAME
FROM EMPLOYEE, COMPANY
WHERE COMPANY.NAME = 'Gossamer Threads' AND
EMPLOYEE.COMPANY_ID = COMPANY.ID</pre>
<p>Note that the join condition is computed and automatically appended at the end
of the query, so you do not have to worry about this.</p>
<p>
</p>
<h2><a name="select_options">SELECT options</a></h2>
<p>The select options for relation are similar to that of table, you have
<code>select_options()</code> which will be set for the next query done. Example:</p>
<pre>
$relation-&gt;select_options(&quot;LIMIT 10&quot;);</pre>
<p>This would append 'LIMIT 10' to your next select query. Another useful thing
is join_on(). <code>join_on()</code> allows you to specify the FK relation for the nextr
select. This overrides what is in the def files. It is useful for allowing you
to have one table which will be join differently depending on what you are
doing. The argument to this are the same as to fk().
Example:</p>
<pre>
$relation-&gt;join_on( remote_table =&gt; { local_column =&gt; remote_column } );</pre>
<p>The FK relation will be changed to this the next time you call <code>select()</code> but
then it will be cleared.</p>
<p>
</p>
<h2><a name="listing_the_relation_columns">Listing the relation columns</a></h2>
<p>* As previously said, the <code>cols()</code> method when invoked on a GT::SQL::Relation
object does not return all the columns, removing the duplicate external
references. So, how does it decides which column to keep and which one to
return?</p>
<p>In the EMPLOYEE-COMPANY example we have the constraint
EMPLOYEE.COMPANY_ID =&gt; COMPANY.ID and it keeps COMPANY_ID, i.e. the foreign key
instead of the key itself.</p>
<p>
</p>
<h2><a name="relation_primary_key">Relation primary key</a></h2>
<p>* The <code>pk()</code> method has to return the table primary key. The property of a primary
key is that it is a non-null unique record identifier. When <code>pk()</code> is invoked on
a Relation object, this base definition is applied to construct the object
primary key.</p>
<p>To find a unique set of fields that makes a good primary key for a Relation
object, the following, simple algorithm is used:</p>
<pre>
. .
. for each table .
. if the table is not referenced by another table that .
. is in the current relation .
. do .
. append the current table's primary key fields to .
. the Relation primary key fields .
. end-do .
. end-if .
. end-for .
. .</pre>
<p>This algorithm selects all the tables that represent the ``many'' in one-to-many
relations, and for all these tables add a list of fields which ensure a record
uniqueness.</p>
<p>
</p>
<h2><a name="foreign_keys_management">Foreign keys management</a></h2>
<p>* When invoked on a GT::SQL::Table object, the <code>fk()</code> method returns a hash which
has the following general structure:</p>
<pre>
{
target_table_1 =&gt; {
source_col_1 =&gt; target_col_1,
source_col_2 =&gt; target_col_2
},
target_table_2 =&gt; {
source_col_1 =&gt; target_col_1
}
}</pre>
<p>The GT::SQL::Relation module returns a hash which has the same structure. The
only difference is that it does not returns the external references which are
managed internally.</p>
<p>This is done for two reasons: As one field is removed from a Relation table, it
would not have been very logical to return a structure that point to
non-existent fields.</p>
<p>Moreover, these internal references from the ``Relation'' point of view have
nothing to do with the external world and thus should not be shown.</p>
<p>(i.e. EMPLOYEE.COMPANY_ID |===&gt; COMPANY.ID would not count in our example)</p>
<p>
</p>
<h2><a name="inserting_data">Inserting data</a></h2>
<p>The interface for inserting data in a Relation is the same as the one that is
being used for Table. However, because rows are being inserted in a relation
one-to-many, things internally work a bit differently.</p>
<p>The Relation <code>insert()</code> method takes an optional argument, which can be
'complete' or 'abort' (default being complete).</p>
<p><code>insert()</code> splits the relation columns into separate records that can be inserted
in a single table. However, some of the records may exist already!</p>
<p>for example, if we perform:</p>
<pre>
$sql = shift; # our GT::SQL object
$rel = $sql-&gt;table(qw/EMPLOYEE COMPANY/);
$rel-&gt;insert({
'EMPLOYEE.NAME' =&gt; $your_name,
'EMPLOYEE.SALARY' =&gt; $big_buck,
'COMPANY.NAME' =&gt; &quot;Gossamer Threads&quot;
});</pre>
<p>Obviously the company ``Gossamer Threads'' already exists, but you were not in
the ``EMPLOYEE'' table. Thus, when 'complete' is specified (it is the default
option), the program will not complain if a record to insert already exists but
just warns and continue the insertion work.</p>
<p>In other words, Gossamer Threads exists already and it will not be inserted
twice, but the employee will still be inserted and will belong to this company.</p>
<p>On the other hand, if you specify ``abort'', then no data is inserted if a
record that has to be inserted would trigger an error in GT::SQL::Table.</p>
<p>This feature can be useful if you want to insert a relation record assuming
that none of the entities that you specify should exist.</p>
<p>
</p>
<h2><a name="deleting_data">Deleting data</a></h2>
<p>Deleting data from a Relation object works using the following pattern:</p>
<pre>
. .
. for each row that matches the delete condition .
. do .
. split the row in table-based records .
. for each table that contains foreing keys from the .
. current relation object .
. do .
. delete the record .
. end-do .
. .
. for each table that is being referenced by another .
. table in the current relation object .
. do .
. delete the record unless there exists .
. some &quot;referencing&quot; data. .
. end-do .
. .</pre>
<p>As I feel that this explanation is probably very confusing, let us see how it
works using our classical example (The salary column has been removed).</p>
<pre>
.-------------------------------------------------------------.
| EMPLOYEE.ID | COMPANY_ID | EMPLOYEE.NAME | COMPANY.NAME |
`-------------------------------------------------------------'
| 1 | 1 | Alex | Gossamer Threads |
|-------------|------------|---------------|------------------|
| 2 | 1 | Scott | Gossamer Threads |
|-------------|------------|---------------|------------------|
| 3 | 1 | Aki | Gossamer Threads |
`-------------------------------------------------------------'</pre>
<p>Now let us say that we do the following:</p>
<pre>
# remove all the crazy geeks
$relation-&gt;delete({ 'EMPLOYEE.NAME' =&gt; 'Scott' });</pre>
<p>This will remove ``Scott'' from the EMPLOYEE table, but of course
Gossamer Threads will not be deleted because there still exists Alex and Aki
that would reference it.</p>
<p>Now if we do:</p>
<pre>
$relation-&gt;delete({ 'COMPANY.NAME' =&gt; 'Gossamer Threads' });</pre>
<p>or even</p>
<pre>
my $condition = new GT::SQL::Condition;
$condition-&gt;add(qw/EMPLOYEE.NAME LIKE %/);
$relation-&gt;delete($condition);</pre>
<p>Then we have generated a condition that matches all the employees, this means
that when the last record will be deleted, then the company Gossamer Threads
will have no more employees and therefore will be deleted.</p>
<p>(Yeah, well, this is for the purpose of this example, of course this will never
happen in real life :) )</p>
<p>
</p>
<h2><a name="updating_records">Updating records</a></h2>
<p>Currently, there exists a limitation on updating records in a Relation, which
is that only the records that represent the ``many'' part of the Relation are
updated.</p>
<p>The way it proceeds to perform the update is pretty simple:</p>
<pre>
. .
. for each row that matches the update condition .
. do .
. split the row in table-based records .
. for each table that contains foreing keys from the .
. current relation object .
. do .
. update the record .
. end-do .
. .</pre>
<p>That means that this will work:</p>
<pre>
# SALARY being a property of EMPLOYEE, it will be updated
# because EMPLOYEE references COMPANY and therefore is a
# &quot;many&quot;
$relation-&gt;update({ SALARY =&gt; $big_bill },
{ 'COMPANY.NAME' =&gt; 'Gossamer Threads' });</pre>
<pre>
# nope, you cannot use Relation to update the COMPANY table that
# way, this will not do anything.
$relation-&gt;update({ 'COMPANY.NAME' =&gt; 'New_Name' },
{ 'COMPANY.NAME' =&gt; 'Gossamer Threads' });</pre>
<p>Who would like to change such a great name anyway ?</p>
<p>
</p>
<h2><a name="selecting_records">Selecting Records</a></h2>
<p>Select behaves exactly like <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Table.html">the GT::SQL::Table manpage</a> select. The only difference is
the ability to specify LEFT JOINs. For instance, if you want to see a list of
Employees who don't belong to a company, you can do:</p>
<pre>
my $relation = $DB-&gt;table('Employees', 'Company');
my $cond = GT::SQL::Condition-&gt;new('Company.ID', 'IS', \'NULL');
my $sth = $relation-&gt;select('left_join', $cond);</pre>
<p>The order of tables specified in the relation constructor is important!</p>
<p>In selecting columns, calling functions utilizing fully qualified column names
will cause GT::SQL::Relation to fail. Simply turn the values into references
like below.</p>
<pre>
my $sth = $relation-&gt;select(&quot;MIN(Company.ID)&quot;); # will fail</pre>
<pre>
my $sth = $relation-&gt;select(\&quot;MIN(Company.ID)&quot;); # will work</pre>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Relation.pm,v 1.102 2004/08/28 03:53:43 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,791 @@
<!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>GT::SQL::Search - internal driver for searching</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#drivers">Drivers</a></li>
<li><a href="#structure_of_an_indexing_driver">Structure of an Indexing Driver</a></li>
<li><a href="#structure_of_indexing_driver">Structure of Indexing Driver</a></li>
<li><a href="#structure_of_a_search_driver">Structure of a Search Driver</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Search - internal driver for searching</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>This implements the query string based searching scheme for GT::SQL. Driver
based, it is designed to take advantage of the different indexing schemes
available on different database engines.</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Instead of describing how Search.pm is interfaced* this will describe how a
driver should be structured and how a new driver can be implemented.</p>
<p>* as it is never accessed directly by the programmer as it was designed to be
called through the functions GT::SQL::Table::query and GT::SQL::Table::query_sth</p>
<p>
</p>
<h2><a name="drivers">Drivers</a></h2>
<p>A driver has two parts. The Indexer and the Search packages are the most
important. Howserver, for any driver in the search, there must exist a directory
with the name of the driver in ALL CAPS. For exampel, MYSQL for MySQL, POSTGRES
for Postgres. Within each driver directory, The Indexer and Search portions of
the driver contains all the information required for initializing the database
table and searching the database.</p>
<p>The Indexing package of the driver handles all the data that is manipulated in
the database and also the initializes and the database for indexing.</p>
<p>The Search package handles the queries and retrieves results for the eventual
consumption by the calling program.</p>
<p>Drivers are simply subclasses of the base driver module, GT::SQL::Search::Base
and operate by overriding certain key functions.</p>
<p>The next few sections will cover how to create a search driver, and assumes a
fair bit of familiarity with GT::SQL.</p>
<p>
</p>
<h2><a name="structure_of_an_indexing_driver">Structure of an Indexing Driver</a></h2>
<p>The following is an absolutely simple skeleton driver that does nothing and but
called ``CUSTOM''. Found in the CUSTOM directory, this is the search package, and
would be call Search.pm in the GT/SQL/Search/CUSTOM library directory.</p>
<pre>
package GT::SQL::Search::CUSTOM::Search;
#------------------------------------------
use strict;
use vars qw/ @ISA /;
use GT::SQL::Search::Base::Search;
@ISA = qw( GT::SQL::Search::Base::Search );
sub load { my $package_name = shift; return GT::SQL::Search::CUSTOM::Search-&gt;new(@_) };
# overrides would go here
1;</pre>
<p>For the indexer, another file, Indexer.pm would be found in the
GT/SQL/Search/CUSTOM directory.</p>
<pre>
package GT::SQL::Search::CUSTOM::Indexer;
#------------------------------------------
use strict;
use vars qw/ @ISA /;
use GT::SQL::Search::Base;
@ISA = qw/ GT::SQL::Search::Base::Indexer /;
sub load { my $package_name = shift; return GT::SQL::Search::CUSTOM::Indexer-&gt;new(@_) };
# overrides would go here
1;</pre>
<p>The almost empty subs that immediately return with a value are functions that
can be overridden to do special tasks. More will be detailed later.</p>
<p>The Driver has been split into two packages. The original package name,
GT::SQL::Search::Nothing, houses the Search package.
GT::SQL::Search::Nothing::Indexer is the Indexing portion of the seach system.
``::Indexer'' must be appended to the orginial search name for the indexer.</p>
<p>Each of the override functions are triggered at points just before and after a
major event occurs in GT::SQL. Depending on the type of actions you require, you
pick and chose which events you'd like your driver to attach to.</p>
<p>
</p>
<h2><a name="structure_of_indexing_driver">Structure of Indexing Driver</a></h2>
<p>The Indexer is responsible for creating all the indexes, maintaining them and
when the table is dropped, removing all the associated indexes.</p>
<p>The following header must be defined for the Indexer.
GT::SQL::Search::Base::Indexer is the superclass that our driver inherits from.</p>
<pre>
package GT::SQL::Search::CUSTOM::Indexer;
#------------------------------------------
use strict;
use vars qw/ @ISA /;
use GT::Base;
use GT::SQL::Search::Base::Indexer;
@ISA = qw/ GT::SQL::Search::Base::Indexer /;</pre>
<p>In addition to the header, the following function must be defined.
GT::SQL::Search::Driver::Indexer::load creates the new object and allows for
special preinitialization that must occur. You can also create another driver
silently (such as defaulting to INTERNAL after a version check fails).</p>
<pre>
sub load { my $package_name = shift; return GT::SQL::Search::CUSTOM::Indexer-&gt;new(@_) };</pre>
<p>Finally, there are the overrides. None of the override functions need be defined
in your driver. Any calls made to undefined methods will silently fallback to
the superclass driver's methods. When a method has been overridden, the function
must return a true value when it is successful, otherwise the action will fail
and an error generated.</p>
<p>Whenever a object is created it will receive one property $self-&gt;{table} which
is the table that is being worked upon. This property is available in all the
method calls and is required for methods such as _create_table and
_drop_search_driver methods.</p>
<p>When a table is first created or when a table is destroyed the following two
functions are called. They are not passed any special values, however, these are
all class methods and $self-&gt;{table} will be a reference to the current table in
use.</p>
<p>This set of overrides are used by GT::SQL::Creator when the ::create method is
called. They are called just prior and then after the create table sql query has
been executed.</p>
<dl>
<dt><strong><a name="item_pre_create_table">pre_create_table</a></strong><br />
</dt>
<dt><strong><a name="item_post_create_table">post_create_table</a></strong><br />
</dt>
<dd>
These functions receive no special parameters. They will receive the data to the
table in the $self-&gt;{table} property.
</dd>
<p></p></dl>
<p>This next set of functions take place in GT::SQL::Editor.</p>
<dl>
<dt><strong><a name="item_drop_search_driver">drop_search_driver</a></strong><br />
</dt>
<dd>
This method receives no special parameters but is responsible for removing all
indexes and ``things'' associated with the indexing schema.
</dd>
<p></p>
<dt><strong><a name="item_add_search_driver">add_search_driver</a></strong><br />
</dt>
<dd>
Receives no extra parameters. Creates all indexes and does all actions required
to initialize indexing scheme.
</dd>
<p></p>
<dt><strong><a name="item_pre_add_column">pre_add_column</a></strong><br />
</dt>
<dt><strong><a name="item_post_add_column">post_add_column</a></strong><br />
</dt>
<dd>
The previous two functions are called just before and after a new column is
added.
</dd>
<dd>
<p>pre_add_column accepts $name (of column), $col (hashref of column attributes).
The method will only be called if the column has a weight associated with it.
The function must return a non-zero value if successful. Note that the returned
value will be passed into the post_add_column so temporary values can be passed
through if required.</p>
</dd>
<dd>
<p>post_add_column accepts $name (of column), $col (hashref of column attributes),
$results (of pre_add_column). This method is called just after the column has
been inserted into the database.</p>
</dd>
<p></p>
<dt><strong><a name="item_pre_delete_column">pre_delete_column</a></strong><br />
</dt>
<dt><strong><a name="item_post_delete_column">post_delete_column</a></strong><br />
</dt>
<dd>
These previous functions are called just before and after the sql for a old
column is deleted. They must remove all objects and ``things'' associated with a
particular column's index.
</dd>
<dd>
<p>pre_delete_column accepts $name (of column), $col (hashref of column
attributes). The method will only be called if the column has a weight
associated with it. The function must return a non-zero value if successful.
Note that the returned value will be passed into the post_delete_column so
temporary values can be passed through if required.</p>
</dd>
<dd>
<p>post_delete_column accepts $name (of column), $col (hashref of column
attributes), $results (of pre_add_column). This method is called just after the
column has been dropped from the database.</p>
</dd>
<p></p>
<dt><strong><a name="item_pre_drop_table">pre_drop_table</a></strong><br />
</dt>
<dt><strong><a name="item_post_drop_table">post_drop_table</a></strong><br />
</dt>
<dd>
The two previous methods are used before and after the table is dropped. The
methods must remove any tables or ``things'' related to indexing from the table.
</dd>
<dd>
<p>pre_drop_table receives no arguments. It can find a copy of the current table
and columns associated in $self-&gt;{table}.</p>
</dd>
<dd>
<p>post_drop_table receives one argument, which is the result of the
pre_drop_table.</p>
</dd>
<p></p></dl>
<p>The following set of functions take place in GT::SQL::Table</p>
<dl>
<dt><strong><a name="item_pre_add_record">pre_add_record</a></strong><br />
</dt>
<dt><strong><a name="item_post_add_record">post_add_record</a></strong><br />
</dt>
<dd>
Called just before and after an insert occurs. These functions take the record
and indexes them as required.
</dd>
<dd>
<p>pre_add_record will receive one argument, $rec, hashref, which is the record
that will be inserted into the database. Table information can be found by
accessing $self-&gt;{table} Much like the other functions, on success the result
will be cached and fed into the post_add_record function.</p>
</dd>
<dd>
<p>post_add_record receives $rec, a hashref to describing the new result, the $sth
of the insert query, and the result of the pre_add_record method. The result
from $sth-&gt;insert_id if there is a ai field will be the new unique primary key.</p>
</dd>
<p></p>
<dt><strong><a name="item_pre_update_record">pre_update_record</a></strong><br />
</dt>
<dt><strong><a name="item_post_update_record">post_update_record</a></strong><br />
</dt>
<dd>
Intercepts the update request before and just after the sql query is executed.
This override has the potential of being rather messy. More than one record can
be modified in this action and the indexer must work a lot to ensure the
database is up to snuff.
</dd>
<dd>
<p>pre_update_record receives two parameters, $set_cond, $where_cond. $set_cond is
a hashref containing the new values that must be set, and $where_cond is a
GT::SQL::Condition object selecting records to update. The result once again, is
cached and if undef is considered an error.</p>
</dd>
<dd>
<p>post_update_record takes the same parameters as pre_update_record, except one
extra paremeter, the result of pre_update_record.</p>
</dd>
<p></p>
<dt><strong><a name="item_pre_delete_record">pre_delete_record</a></strong><br />
</dt>
<dt><strong><a name="item_post_delete_record">post_delete_record</a></strong><br />
</dt>
<dd>
Called just before and after the deletion request for records are called.
</dd>
<dd>
<p>pre_delete_record, has only one parameter, $where, a GT::SQL::Condition object
telling which records to delete. The results of this method are passed to
post_delete_record.</p>
</dd>
<dd>
<p>post_delete_record, has one addition parameter to pre_delete_record and like
most post_ methods, is the result of the pre_delete_record method.</p>
</dd>
<p></p>
<dt><strong><a name="item_pre_delete_all_records">pre_delete_all_records</a></strong><br />
</dt>
<dt><strong><a name="item_post_delete_all_records">post_delete_all_records</a></strong><br />
</dt>
<dd>
These two functions are quite simple, but they are different from drop search
driver in that though the records are all dropped, the framework for all the
indexing is not dropped as well.
</dd>
<dd>
<p>Neither function is passed any special data, except for post_delete_all_records
which receives the rsults of the pre_delete_all_records method.</p>
</dd>
<p></p>
<dt><strong><a name="item_reindex_all">reindex_all</a></strong><br />
</dt>
<dd>
This function is sometimes called by the user to refresh the index. The
motivation for this, in the case of the INTERNAL driver, is sometimes due to
outside manipulation of the database tables, the index can become
non-representative of the data in the tables. This method is to force the
indexing system to fix errors that have passed.
</dd>
<p></p>
<dt><strong><a name="item_ok">ok</a></strong><br />
</dt>
<dd>
This function is called by GT::SQL::Search as a package method,
GT::SQL::Search::EXAMPLE::Indexer-&gt;ok( $table ); and is passed a table object
reference. What this function must do is to return a true or false value that
tells the search system if this driver can be used. The MYSQL driver has a good
example for this, it tests to ensure that the mysql database system version is
at least 3.23.23.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="structure_of_a_search_driver">Structure of a Search Driver</a></h2>
<p>The Searcher is responsible for only one thing, to return results from a query
search. You can override the parser, however, subclassing the following methods
will have full parsing for all things such as +/-, string parsing and substring
matching.</p>
<p>The structures passed into the methods get a little complicated so beware!</p>
<p>ALL the following functions receive two parameters, the first is a search
parameters detailing the words/phrases to search for, the second parameter is
the current result set of IDs =&gt; scores.</p>
<p>There are two types of search parameters, one for words and the other for
phrases. The structure is a little messy so I'll detail them here.</p>
<p>For words, the structure is like the following:</p>
<pre>
$word_search = {
'word' =&gt; {
substring =&gt; '1', # set to 1 if this is substring match
phrase =&gt; 0, # not a phrase
keyword =&gt; 1, # is a keyword
mode =&gt; '', # can also be must, cannot to mean +/-
},
'word2' =&gt; ...
}</pre>
<p>For phrases the structure will become:</p>
<pre>
$phrase_search =&gt; {
'phrase' =&gt; {
substring =&gt; undef # never required
phrase =&gt; [
'word1',
'word2',
'word3',
...
], # for searching by indiv word if required
keyword =&gt; 0, # not a keyword
mode =&gt; '' # can also be must, cannot
},
'phrase2' =&gt; ...
}</pre>
<p>Based on these structures, hopefully it will be easy enough to build whatever is
required to grab the appropriate records.</p>
<p>Finally, the second item passed in will be a hash filled with ID =&gt; score values
of search results. They look something like this:</p>
<pre>
$results = {
1 =&gt; 56,
2 =&gt; 31,
4 =&gt; 6
}</pre>
<p>It is important for all the methods to take the results and return the results,
as the result set will be daisychained down like a set to be operated on by
various searching schemes.</p>
<p>At the end of the query, the results in this set will be sorted and returned to
the user as an sth.</p>
<p>Operations on this set are preformed by the following five methods.</p>
<dl>
<dt><strong><a name="item__query">_query</a></strong><br />
</dt>
<dd>
This method is called just after all the query string has been parsed and put
into their proper buckets. This method is overridden by the INTERNAL driver to
decide it wants to switch to the NONINDEX driver for better performance.
</dd>
<dd>
<p>Two parameters are passed in, ( $input, $buckets ). $input is a hash that
contains all the form/cgi parameters passed to the $tbl-&gt;query function and
$buckets is s the structure that is created after the query string is parsed.
You may also call $self-&gt;SUPER::_query( $input, $buckets ) to pass the request
along normally.</p>
</dd>
<dd>
<p>You must return undef or an STH from this function.</p>
</dd>
<p></p>
<dt><strong><a name="item__union_query">_union_query</a></strong><br />
</dt>
<dd>
This method takes a $word_search and does a simple match query. If it finds
records with any of the words included, it will append the results to the list.
Passed in is the $results and it must return the altered results set.
</dd>
<dd>
<p>This method must also implement substring searching.</p>
</dd>
<p></p>
<dt><strong><a name="item__phrase_query">_phrase_query</a></strong><br />
</dt>
<dd>
Just like the union_query, however it searches based on phrases.
</dd>
<p></p>
<dt><strong><a name="item__phrase_intersect_query">_phrase_intersect_query</a></strong><br />
</dt>
<dd>
This takes a $phrase_search and a $result as parameters. This method must look
to find results that are found within the current result set that have the
passed phrases as well. However, if there are no results found, this method can
look for more results.
</dd>
<p></p>
<dt><strong><a name="item__intersect_query">_intersect_query</a></strong><br />
</dt>
<dd>
Takes two parameters, a $word_search, and $results. Just like the
_phrase_intersect query, if there are results already, tries to whittle away the
result set. If there are no results, tries to look for results that have all the
keywords in a record.
</dd>
<dd>
<p>This method must also implement substring searching.</p>
</dd>
<p></p>
<dt><strong><a name="item__disjoin_query">_disjoin_query</a></strong><br />
</dt>
<dd>
Takes two parameters, a $word_search, and $results. This will look through the
result set and remove all matches to any of the keywords.
</dd>
<dd>
<p>This method must also implement substring searching.</p>
</dd>
<p></p>
<dt><strong><a name="item__phrase_disjoin_query">_phrase_disjoin_query</a></strong><br />
</dt>
<dd>
Two parameters, $phrase_search and $results are passed to this method. This does
the exact same thing as _disjoin_query but it looks for phrases.
</dd>
<p></p>
<dt><strong><a name="item_query">query</a></strong><br />
</dt>
<dd>
If you choose to override this method, you will have full control of the query.
</dd>
<dd>
<p>This method accepts a $CGI or a $HASH object and performs the following</p>
</dd>
<dd>
<pre>
Options:
- paging
mh : max hits
nh : number hit (or page of hits)
sb : column to sort by (default is by score)</pre>
</dd>
<dd>
<pre>
- searching
ww : whole word
ma : 1 =&gt; OR match, 0 =&gt; AND match, undefined =&gt; QUERY
substring : search for substrings of words
bool : 'and' =&gt; and search, 'or' =&gt; or search, '' =&gt; regular query
query : the string of things to ask for</pre>
</dd>
<dd>
<pre>
- filtering
field_name : value # Find all rows with field_name = value
field_name : &quot;&gt;value&quot; # Find all rows with field_name &gt; value.
field_name : &quot;&lt;value&quot; # Find all rows with field_name &lt; value.
field_name-gt : value # Find all rows with field_name &gt; value.
field_name-lt : value # Find all rows with field_name &lt; value.</pre>
</dd>
<dd>
<p>The function must return a STH object. However, you may find useful the
GT::SQL::Search::STH object, which will automatically handle mh, nh, and
alternative sorting requests. All you will have to do is</p>
</dd>
<dd>
<pre>
sub query { ... your code ... return $self-&gt;sth( $results ); }</pre>
</dd>
<dd>
<p>Where results is a hashref containing primarykeyvalue =&gt; scorevalues.</p>
</dd>
<p></p>
<dt><strong><a name="item_alternate_driver_query">alternate_driver_query</a></strong><br />
</dt>
<dd>
There is no reason to override this method, however, if you would like to use
another driver's search instead of the current, this method will let you do so.
</dd>
<dd>
<p>Accepting 2 parameters, ( $drivername, $input ), where $drivername is the name
of the driver you'd like to use and $input is the parameters passed to the
method. Returned is an $sth value (undef if an error has occured). This method
was used in the INTERNAL driver to shunt to NONINDEXED if it found the search
would take too long.</p>
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Search.pm,v 1.60 2004/08/28 03:53:43 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/Base/Common.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/Base/Indexer.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/Base/STH.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/Base/Search.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/INTERNAL/Indexer.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/INTERNAL/Search.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/MSSQL/Indexer.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/MSSQL/Search.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/MYSQL/Indexer.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/MYSQL/Search.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/MYSQL/VER3.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/MYSQL/VER4.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/NONINDEXED/Indexer.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Search/NONINDEXED/Search.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,830 @@
<!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>GT::SQL::Table - a perl interface to manipulate a single SQL table.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#query__query_sth">query, query_sth</a></li>
<li><a href="#select">select</a></li>
<li><a href="#select_options">select_options</a></li>
<li><a href="#count">count</a></li>
<li><a href="#hits">hits</a></li>
<li><a href="#get">get</a></li>
<li><a href="#add">add</a></li>
<li><a href="#insert">insert</a></li>
<li><a href="#insert_multiple">insert_multiple</a></li>
<li><a href="#modify">modify</a></li>
<li><a href="#update">update</a></li>
<li><a href="#delete">delete</a></li>
<li><a href="#delete_all">delete_all</a></li>
<li><a href="#table_properties">Table Properties</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Table - a perl interface to manipulate a single SQL table.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $sth = $table-&gt;select(Column3 =&gt; { Column =&gt; $value, Column2 =&gt; $value2 });
$table-&gt;delete({ Column =&gt; $value });
$table-&gt;insert({ Column1 =&gt; $val, Column2 =&gt; $value2 });
$table-&gt;update({ SetCol =&gt; $val }, { WhereCol =&gt; $val2 });</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL::Table provides methods to add, modify, delete and search over a single
SQL table.</p>
<p>The following methods are provided.</p>
<p>
</p>
<h2><a name="query__query_sth">query, query_sth</a></h2>
<p><code>query</code> provides a simple and powerful method to search a table. It takes as
input either a hash, hash ref or CGI object making it especially useful
searching from web forms.</p>
<pre>
my $results = $db-&gt;query($in);</pre>
<p>The return of <code>query</code> is an arrayref of arrayrefs. <code>query_sth</code> returns an STH
that you can fetch rows from.</p>
<p>Typical usage to go through the results is:</p>
<pre>
my $results = $db-&gt;query({ Title =&gt; 'foobar' });
if ($results) {
for my $result (@$results) {
...
}
}</pre>
<p>To specify what to search, you simply pass in column =&gt; search value. However,
you can also pass in a lot of options to enhance your search:</p>
<p>Find all rows with field_name = value:</p>
<pre>
field_name =&gt; value</pre>
<p>Find all rows with field_name &gt; value:</p>
<pre>
field_name =&gt; &quot;&gt;value&quot;</pre>
<p>Find all rows with field_name &lt; value:</p>
<pre>
field_name =&gt; &quot;&lt;value&quot;</pre>
<p>Find all rows with field_name &gt; value:</p>
<pre>
field_name-gt =&gt; value</pre>
<p>Find all rows with field_name &lt; value:</p>
<pre>
field_name-lt =&gt; value</pre>
<p>Find all rows where any field_name = value:</p>
<pre>
keyword =&gt; value</pre>
<p>Find all rows using indexed search (see weights):</p>
<pre>
query =&gt; value</pre>
<p>Set to 1, use '=' comparison, 0/unspecified use 'LIKE '%val%' comparision:</p>
<pre>
ww =&gt; 1</pre>
<p>Search using LIKE for column 'Title' (valid opts are '=', '&gt;', '&lt;' or 'LIKE'):</p>
<pre>
Title-opt =&gt; 'LIKE'</pre>
<p>Set to 1, OR match results, 0/unspecified AND match results:</p>
<pre>
ma =&gt; 1</pre>
<p>Return a max of n results, defaults to 25:</p>
<pre>
mh =&gt; n</pre>
<p>Return page n of results:</p>
<pre>
nh =&gt; n</pre>
<p>Sort by 'Title' column:</p>
<pre>
sb =&gt; 'Title'</pre>
<p>Sort in ascending (ASC) or descending (DESC) order:</p>
<pre>
so =&gt; 'ASC'</pre>
<p>
</p>
<h2><a name="select">select</a></h2>
<p>Select provides a way to implement almost any sql SELECT statement.</p>
<p>An executed statement handle is returned that you can call the normal fetchrow,
fetchrow_array, fetchrow_hashref, etc on.</p>
<pre>
my $sth = $obj-&gt;select;</pre>
<p>is equivalant to ``SELECT * FROM Table''</p>
<pre>
my $sth = $obj-&gt;select({ Col =&gt; Val });</pre>
<p>is equivalant to ``SELECT * FROM Table WHERE Col = 'Val'''.</p>
<pre>
my $sth = $obj-&gt;select('Col2', 'Col3', { Col =&gt; &quot;Val&quot; });</pre>
<p>is equivalant to ``SELECT Col2,Col3 FROM Table WHERE Col =&gt; 'Val'''.</p>
<p>So you can pass in a hash reference which represents the where clause, and an
array reference where represents what you want to select on.</p>
<p>If you need more complex where clauses, you should use a condition object
instead of a hash reference. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Condition.html">the GT::SQL::Condition manpage</a> for more information.</p>
<p>Notes:</p>
<dl>
<dt><strong><a name="item_quoting_in_where">quoting in where</a></strong><br />
</dt>
<dd>
All arguments in the where clause are automatically quoted. If you don't want
quotes, you should pass in a scalar reference as in:
</dd>
<dd>
<pre>
my $sth = $obj-&gt;select({ Col =&gt; \&quot;NOW()&quot; });</pre>
</dd>
<dd>
<p>which turns into ``SELECT * FROM Table WHERE Col = NOW()''.</p>
</dd>
<p></p>
<dt><strong><a name="item_quoting_in_select">quoting in select</a></strong><br />
</dt>
<dd>
Nothing in the select will be quoted, so to use functions, simply pass in what
you want:
</dd>
<dd>
<pre>
my $sth = $obj-&gt;select('COUNT(*)');</pre>
</dd>
<dd>
<p>which turns into ``SELECT <code>COUNT(*)</code> FROM Table''.</p>
</dd>
<p></p></dl>
<p>To specify LIMIT, or GROUP BY, or ORDER BY or other SELECT clauses that come
after the WHERE, you should use select_options below.</p>
<p>
</p>
<h2><a name="select_options">select_options</a></h2>
<p>This method provides a way for you to specify select options such as LIMIT and
SORT_BY.</p>
<pre>
$obj-&gt;select_options(@OPTIONS);</pre>
<p>@OPTIONS should be a list of options you want appended to your next select.</p>
<p>For example,</p>
<pre>
$obj-&gt;select_options('ORDER BY Foo', 'LIMIT 50');
$obj-&gt;select;</pre>
<p>would turn into ``SELECT * FROM Table ORDER BY Foo LIMIT 50''. To perform a
LIMIT with an OFFSET, you should specify something like:</p>
<pre>
$obj-&gt;select_options('LIMIT 25 OFFSET 75');</pre>
<p>You can alternatively use the equivelant MySQL-specific syntax:</p>
<pre>
$obj-&gt;select_options('LIMIT 75, 25');</pre>
<p>Both will be handled correctly regardless of the database type.</p>
<p>
</p>
<h2><a name="count">count</a></h2>
<p>This method will allow you to count records based on a where clause.</p>
<pre>
my $count = $obj-&gt;count($condition);</pre>
<p><code>count()</code> takes either a condition or a hash reference. If no argument is
provided, it is equivalant to ``SELECT <code>COUNT(*)</code> FROM Table'', or total number of
rows.</p>
<p>
</p>
<h2><a name="hits">hits</a></h2>
<p>This method returns the number of hits from that last select query <strong>without</strong>
the limit clause if there was one.</p>
<pre>
$hits = $obj-&gt;hits;</pre>
<p>For example, to get rows 20-30 of a query result, use:</p>
<pre>
$obj-&gt;select_options(&quot;LIMIT 10 OFFSET 20&quot;); $obj-&gt;select({ Column =&gt; 'Foo' });</pre>
<p>this translates into (in MySQL):</p>
<pre>
SELECT * FROM Table WHERE Column = 'Foo' LIMIT 20, 10</pre>
<p>To see the total number of results that the query would have retrieved without
any limit, you call:</p>
<pre>
$hits = $obj-&gt;hits;</pre>
<p>If the number of hits can be calculated, it will be returned to you without any
additional query. Otherwise, the following query will be performed
automatically, and the hit count returned to you:</p>
<pre>
SELECT COUNT(*) FROM Table WHERE Column = 'Foo'</pre>
<p><strong>NOTE</strong>: The <code>hits()</code> method _only_ applies to select queries. Most databases do
not provide enough information to get counts of rows affected for other types
of queries.</p>
<p>
</p>
<h2><a name="get">get</a></h2>
<p>This method allows for a simple interface to retrieving records from the
table(s).</p>
<pre>
my $rec_hash_ref = $obj-&gt;get($val);
my $rec_hash_ref = $obj-&gt;get($val, 'HASH', ['col1', 'col2']);
my $rec_array_ref = $obj-&gt;get($val, 'ARRAY');</pre>
<p>The first argument is the primary key value of the record you want to retrieve.</p>
<p>The second argument is a format option. It can be either 'ARRAY' or 'HASH' and
determines whether you are returned a HASH reference or an ARRAY reference. The
default is 'HASH', and it is optional.</p>
<p>The last argument is a list of column names you want retrieved. <code>get</code> defaults
to returning the entire record, but if you only need specific columns, you can
ask for the ones you want.</p>
<p>For example:</p>
<pre>
my $employee = $emp_db-&gt;get('Alex');</pre>
<p>would return a hash ref of the record whose primary key is equal to 'Alex'.</p>
<pre>
my $emp_addr = $emp_db-&gt;get('Alex', 'HASH', ['City', 'State', 'ZipCode']);</pre>
<p>would return a hash ref of only the three fields City, State, ZipCode for the
record whose primary key equals Alex.</p>
<p>
</p>
<h2><a name="add">add</a></h2>
<p>Method to add an entry into the database. This method can take it's arguments
one of three ways.</p>
<pre>
$obj-&gt;add($CGI_OBJECT);</pre>
<pre>
-or-</pre>
<pre>
$obj-&gt;add({
col1 =&gt; $val1,
col2 =&gt; $val2,
...
});</pre>
<pre>
-or-</pre>
<pre>
$obj-&gt;add(
col1 =&gt; $val1,
col2 =&gt; $val2,
...
);</pre>
<p>This method can take a cgi object, a hash reference or a hash. The keys of the
hash should be the names of the column and the values should be the values to
insert into the fields. The CGI Object is not different. If the table has an
auto_increment field, the value of the last inserted record will be returned.</p>
<p><code>add</code> returns undef on failure. If successful, and the table has an
auto-increment field, the auto increment value is returned. If there is no
auto increment value, then 1 is returned. Any errors will be in
$GT::SQL::error.</p>
<p>Passing in GT_SQL_SKIP_CHECK =&gt; 1 will have the table module skip any error
checking it should perform.</p>
<p>Passing in GT_SQL_SKIP_INDEX =&gt; 1 will not index the fields. You can also use
the <code>indexing</code> method to do this.</p>
<p>
</p>
<h2><a name="insert">insert</a></h2>
<p><code>insert</code> is a lower level add. The main differences between <code>add</code> and
<code>insert</code> are that add performs a not null check, and add returns the id of the
just inserted value.</p>
<p><code>insert</code> does not perform a not null check. Also, insert returns the statement
handle used to do the insert (so you can call $sth-&gt;insert_id to get the auto
increment).</p>
<p>
</p>
<h2><a name="insert_multiple">insert_multiple</a></h2>
<p><code>insert_multiple</code> will try to optimize the insertion of multiple rows with
simple values. Under MySQL, this uses MySQL's extended insert syntax:</p>
<pre>
INSERT INTO Table (col1, col2, col3)
VALUES ('val1', 'val2', 'val3'), ('val4', 'val5', 'val6'), ...</pre>
<p>On other databases, it attempts to perform all insertions in a single
transaction, which will also usually yield performance benefits. Note,
however, that <code>insert_multiple</code> should not be used for anything more complex
than basic column values - for example, inserting NULL to set the current date,
or using raw SQL by passing scalar references for values.</p>
<p>It takes at least two arguments - the first argument is an array ref of column
names, and the rest are array references of values. For example, to produce
the above example SQL code, you would call:</p>
<pre>
$table-&gt;insert_multiple(
['col1', 'col2', 'col3'],
['val1', 'val2', 'val3'],
['val4', 'val5', 'val6'],
...
);</pre>
<p>
</p>
<h2><a name="modify">modify</a></h2>
<p>This method is designed for modifying a single entry in the table. It takes as
input a hash, hash ref or CGI object, which is assumed to represent a single
row with all fields intact.</p>
<p><code>modify</code> will then look for the primary key in the input and set all fields
for that row equal to what was passed in.</p>
<p>You need to pass in a complete record! If you just want to update one column,
you probably want to use <code>update</code> instead, as doing:</p>
<pre>
my $result = $obj-&gt;modify(column1 =&gt; 'Foo');</pre>
<p>will blank out all the other fields and set just column1 to Foo.</p>
<p><code>modify</code> returns undef on failure, 1 on success. The error message will be
available in $GT::SQL::error.</p>
<p>
</p>
<h2><a name="update">update</a></h2>
<p>This method provides a more robust way to update multiple entries in the table.</p>
<pre>
my $result = $obj-&gt;update(
{
col1 =&gt; $val1,
col2 =&gt; $val2,
...
},
$condition
);</pre>
<pre>
-or-</pre>
<pre>
my $result = $obj-&gt;update(
{
col1 =&gt; $val1,
col2 =&gt; $val2,
...
},
{
col1 =&gt; $val1,
col2 =&gt; $val2,
...
}
);</pre>
<p>In both these cases the first argument is a hash reference with the column
names as the keys and the new values you want the columns to hold as the
values. The second argument can either be a condition object or a hash
reference. If it is a hash reference the keys will be used as the column names
and the values will be taken as the current column values for the where clause
to update the table.</p>
<pre>
$obj-&gt;update({ Setme =&gt; 'NewValue'}, { WhereCol =&gt; 5 });</pre>
<p>would set the column 'Setme' to 'NewValue' where the column 'WhereCol' is 5.
This translates to:</p>
<pre>
UPDATE Table SET SetMe='NewValue' WHERE WhereCol = 5</pre>
<p>If the second argument is a GT::SQL::Condition object the condition object will
be used to build the where clause with. Please see <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Condition.html">the GT::SQL::Condition manpage</a> for a
description of what you can do with a where clause.</p>
<pre>
my $condition = GT::SQL::Condition-&gt;new('WhereCol', 'LIKE', 'Foo%');
$obj-&gt;update({ Setme =&gt; 'Newvalue' }, $condition);</pre>
<p>would translate to:</p>
<pre>
UPDATE Table SET Setme = 'Newvalue' WHERE WhereCol LIKE 'Foo%'</pre>
<p>The condition can now much more complex where clauses though.</p>
<p><code>update</code> returns undef on failure and the a <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Driver.html">the GT::SQL::Driver manpage</a> statement
handle on success. The error message will be available in $GT::SQL::error.</p>
<p>Passing in GT_SQL_SKIP_CHECK =&gt; 1 as a third option to <code>update</code> will have the
table module skip any error checking it should perform.</p>
<p>Passing in GT_SQL_SKIP_INDEX =&gt; 1 will not index the fields. You can also use
the <code>indexing</code> method to do this.</p>
<p>
</p>
<h2><a name="delete">delete</a></h2>
<p>This method provides a robust interface to delete entries from your <code>table(s)</code>
using join and or foreign key relations.</p>
<pre>
my $result = $obj-&gt;delete($condition);</pre>
<p>You can pass into <code>delete</code> either a condition object to delete multiple
entries, or a scalar value to delete the row whose primary key equals the
value. If you have a multiple primary key, then you can pass in an array ref to
delete that row.</p>
<pre>
my $result = $obj-&gt;delete({
col1 =&gt; $val1,
col2 =&gt; $val2,
...
);</pre>
<pre>
-or-</pre>
<pre>
$obj-&gt;delete($val);</pre>
<pre>
-or-</pre>
<pre>
$obj-&gt;delete([$val1, $val2]);</pre>
<p><code>delete</code> returns undef on failure, 1 on success. The error message will be
available in $GT::SQL::error.</p>
<p>
</p>
<h2><a name="delete_all">delete_all</a></h2>
<p>This method takes no arguments and will erase all entries from a table.</p>
<p>
</p>
<h2><a name="table_properties">Table Properties</a></h2>
<p>Table provides a lot of methods to access information about the table:</p>
<dl>
<dt><strong><a name="item_name">name</a></strong><br />
</dt>
<dd>
Provides the name of the table minus any prefix.
</dd>
<p></p>
<dt><strong><a name="item_ai">ai</a></strong><br />
</dt>
<dd>
Returns the name of the auto-increment field if any.
</dd>
<p></p>
<dt><strong><a name="item_pk">pk</a></strong><br />
</dt>
<dd>
Returns an <code>array(ref)</code> of primary key column names.
</dd>
<p></p>
<dt><strong><a name="item_fk">fk</a></strong><br />
</dt>
<dd>
Returns a hash of foreign key values.
</dd>
<p></p>
<dt><strong><a name="item_fk_tables">fk_tables</a></strong><br />
</dt>
<dd>
Returns a list of tables with foreign keys pointing to this table.
</dd>
<p></p>
<dt><strong><a name="item_index">index</a></strong><br />
</dt>
<dd>
Returns a hash ref of index name =&gt; array ref of column names that index uses.
</dd>
<p></p>
<dt><strong><a name="item_unique">unique</a></strong><br />
</dt>
<dd>
Returns a hash ref of unique index names =&gt; array ref of column names that
unique index uses.
</dd>
<p></p>
<dt><strong><a name="item_all_indexes"><strong>all_indexes</strong></a></strong><br />
</dt>
<dd>
Returns the joined output of index and unique and primary key.
</dd>
<p></p>
<dt><strong><a name="item_cols">cols</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; column definition
</dd>
<p></p>
<dt><strong><a name="item_default">default</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; default value.
</dd>
<p></p>
<dt><strong><a name="item_size">size</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; size of column in SQL.
</dd>
<p></p>
<dt><strong><a name="item_type">type</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; type of column in SQL.
</dd>
<p></p>
<dt><strong><a name="item_form_display">form_display</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; name to display on auto generated forms
(think pretty name).
</dd>
<p></p>
<dt><strong><a name="item_form_size">form_size</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; size of html form to generate.
</dd>
<p></p>
<dt><strong><a name="item_form_type">form_type</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; type of html form to generate (checkbox,
select, text, etc).
</dd>
<p></p>
<dt><strong><a name="item_form_names">form_names</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; array ref of form names. This is used for
multi option form elements like checkboxes and multi selects. The name is what
is displayed to the user and not entered in the database.
</dd>
<p></p>
<dt><strong><a name="item_form_values">form_values</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; array ref of form values. Same as above,
but this is the value that actually gets entered.
</dd>
<p></p>
<dt><strong><a name="item_time_check">time_check</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; time check on or off. If set
</dd>
<p></p>
<dt><strong><a name="item_regex">regex</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; regular expression that all input must
pass before being inserted.
</dd>
<p></p>
<dt><strong><a name="item_pos">pos</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; position in table.
</dd>
<p></p>
<dt><strong><a name="item_not_null">not_null</a></strong><br />
</dt>
<dd>
Returns a <code>hash(ref)</code> of column name =&gt; not null (whether the field is allowed to
be null or not).
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Table.pm,v 1.251 2005/02/28 20:37:41 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,686 @@
<!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>GT::SQL::Tree - Helps create and manage a tree in an SQL database.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#new__tree">new, tree</a></li>
<li><a href="#create__add_tree">create, add_tree</a></li>
<li><a href="#destroy__drop_tree">destroy, drop_tree</a></li>
<li><a href="#root_id_col__father_id_co__depth_col">root_id_col, father_id_co, depth_col</a></li>
<li><a href="#children">children</a></li>
<li><a href="#parents">parents</a></li>
<li><a href="#child_ids">child_ids</a></li>
<li><a href="#parent_ids">parent_ids</a></li>
</ul>
<li><a href="#indices">INDICES</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Tree - Helps create and manage a tree in an SQL database.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::SQL::Tree;</pre>
<pre>
my $tree = $table-&gt;tree;
my $children = $tree-&gt;children(id =&gt; [1,2,3], max_depth =&gt; 2);</pre>
<pre>
my $parents = $tree-&gt;parents(id =&gt; [4,5,6]);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL::Tree is designed to implement a tree structure with a SQL table. Most
of the work on managing the table is performed automatically behind the scenes,
however there are a couple of front end methods to retrieving the tree nodes
from a GT::SQL::Tree object.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>
</p>
<h2><a name="new__tree">new, tree</a></h2>
<p>Typically, the way to get a tree object is to call -&gt;tree on a table object. The
table object then calls GT::SQL::Tree-&gt;new for you and returns the results,
which is a GT::SQL::Tree object. Typically you should not call -&gt;new directly,
but instead let $table-&gt;tree call it with the proper arguments.</p>
<p>
</p>
<h2><a name="create__add_tree">create, add_tree</a></h2>
<p>To use GT::SQL::Tree, you need to first call create(). You shouldn't call it
directly, but instead call -&gt;<code>add_tree()</code> on an editor object. The arguments to
add_tree are passed through to create, so that they are essentially the same
(there is one exception - add_tree passed in <code>table =&gt; $table_object</code>).</p>
<p><code>create()</code> will create a tree table, with the name passed on the name of the table
passed in. For example, if you wish to build a tree on 'MyTable', the tree table
that is created by <code>create()</code> will be named MyTable_tree. The tree table provides
easy one-query access to all of a nodes parents or children, and also keeps
track of the number of hops between a node and its descendant, allowing you to
limit how far you descend into the tree.</p>
<p>The following arguments are required:</p>
<dl>
<dt><strong><a name="item_table">table</a></strong><br />
</dt>
<dd>
This contains the table object for the table the tree is to be built upon. Note
that when calling add_tree you <strong>should not</strong> specify this - add_tree passes it
along on its own.
</dd>
<p></p>
<dt><strong><a name="item_father">father</a></strong><br />
</dt>
<dd>
This must specify the name of the father ID column. The father ID column
controls the relationship between father/child.
</dd>
<dd>
<p>For example, if your primary key is ``my_id'' and your father id column is
``my_father_id'', you would pass in ``my_father_id'' as the value to <a href="#item_father"><code>father</code></a>.</p>
</dd>
<p></p>
<dt><strong><a name="item_root">root</a></strong><br />
</dt>
<dd>
This is used to specify the name of the root column. For example, if your
primary key is ``my_id'' and your root id column is ``my_root_id'', you would pass
in ``my_root_id'' as the value to <a href="#item_root"><code>root</code></a>.
</dd>
<p></p>
<dt><strong><a name="item_depth">depth</a></strong><br />
</dt>
<dd>
This is used to specify the name of the depth column for the table. For example,
if you are using a column named ``my_depth'' to keep track of the depth of a node,
you would pass in ``my_depth'' as the value to <a href="#item_depth"><code>depth</code></a>.
</dd>
<p></p></dl>
<p>The following are optional arguments to create/add_tree:</p>
<dl>
<dt><strong><a name="item_force">force</a></strong><br />
</dt>
<dd>
Takes a value such as 'force' or 'check'. This value is passed on to the
GT::SQL table creation subroutine.
</dd>
<p></p>
<dt><strong><a name="item_rebuild">rebuild</a></strong><br />
</dt>
<dd>
You can pass in a GT::SQL::Tree::Rebuild object if you have an incomplete or
invalid table structure. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Tree/Rebuild.html">the GT::SQL::Tree::Rebuild manpage</a> for more details.
</dd>
<p></p>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
Sets the debug level of the tree object. <code>add_tree()</code> automatically passes in the
debug value for the table object, so it normally is not necessary to set this.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="destroy__drop_tree">destroy, drop_tree</a></h2>
<p>You can call <code>$tree-&gt;destroy</code> to destroy a tree. This involves dropping the
tree table and deleting the tree reference from the table the tree was on. This
can be called by calling <code>$tree-&gt;destroy()</code> on a GT::SQL::Tree object,
however this is typically invoked by calling <code>$editor-&gt;drop_tree()</code> on a
table editor object.</p>
<p>Neither <code>$tree-&gt;destroy()</code> nor <code>$editor-&gt;drop_tree()</code> take any
arguments.</p>
<p>
</p>
<h2><a name="root_id_col__father_id_co__depth_col">root_id_col, father_id_co, depth_col</a></h2>
<p>These three tree object methods return the name of the associated column in the
main table. Usually you will already know them, and these methods are primarily
used internally.</p>
<p>
</p>
<h2><a name="children">children</a></h2>
<p>This is where the usefulness of the tree module comes into play.
<code>$tree-&gt;children</code> is used to access all of the children of a particular
node. It takes a wide variety of arguments to control the return.</p>
<p>Usually, the return will be either a hash reference of array references each
containing hash references, or else an array reference of hash references. Which
reference you get depends on what you request via the <a href="#item_id"><code>id</code></a> parameter, described
below. Each inner hash reference is a row from the database, typically a joined
row from the table the tree is on with the tree table, however the
<a href="#item_roots_only"><code>roots_only</code></a>, <a href="#item_cols"><code>cols</code></a>, and <a href="#item_select_from"><code>select_from</code></a> parameters all change this behaviour.</p>
<p>The arguments to <code>children()</code> are as follows:</p>
<dl>
<dt><strong><a name="item_id">id</a></strong><br />
</dt>
<dd>
The value of the id key is either a scalar value, or an array reference. The
value/values to id should be the id whose descendants you are looking for. For
example, if you are looking for the children of ID 3 and ID 4, you would pass in
<code>id =&gt; [3, 4]</code>. The return value of children will be a hash reference
containing two keys: 3 and 4.
</dd>
<dd>
<p>If you are looking for the children of a single ID and pass the id as a scalar
value, you will get back an array reference as described above.</p>
</dd>
<dd>
<p>So, basically, if the value to id is an array reference, you will get back a
hash reference of array references of hash references; if it is a scalar value,
you will get back an array reference of hash references.
$tree-&gt;children(id =&gt; [1])-&gt;{1};
and
$tree-&gt;children(id =&gt; 1);
will result in the same thing.</p>
</dd>
<dd>
<p>To get all the trees in a single query, you pass in 0 as the value. This is as
if you are requesting the children of the imaginary root to which all roots
belong.</p>
</dd>
<dd>
<p><a href="#item_id"><code>id</code></a> is the only required parameter.</p>
</dd>
<p></p>
<dt><strong><a name="item_max_depth">max_depth</a></strong><br />
</dt>
<dd>
You can specify a max_depth value to specify that the records returned should
not be more a certain distance from the node. For example, supposing you have
this tree:
a
b
c
d
Selecting the children of a with a max_depth of 1 would return just b, not c or
d. A max_depth of 2 would return b and c.
</dd>
<dd>
<p>Not specifying max_depth means that you do not want to limit the maximum
distance from the parent of the returned values.</p>
</dd>
<p></p>
<dt><strong><a name="item_cols">cols</a></strong><br />
</dt>
<dd>
You can specify an array reference as the value to <a href="#item_cols"><code>cols</code></a> to alter the values
returned. Instead of doing ``SELECT * FROM ...'', the query will be ``SELECT &lt;what
you specify&gt; FROM ...''. Note, however, that the father, root, and depth columns
are required and will be present in the rows returned whether or not you specify
them.
</dd>
<p></p>
<dt><strong><a name="item_sort_col_2c_sort_order">sort_col, sort_order</a></strong><br />
</dt>
<dd>
Where the <code>sort</code> option sorts the results based on tree levels, <code>sort_col</code> and
<code>sort_order</code> control the sorting for nodes with the same father ID. For
example, with this tree:
a
b
c
<code>sort_col</code> and <code>sort_order</code> affect whether or not b comes before or after c.
The value of each can either be a scalar value or an array reference. There is
essentially no difference, the scalar value is just a little easier when you are
only sorting on a single column. The values of <code>sort_col</code> should be column
names, and the values of <code>sort_order</code> 'ASC' or 'DESC', per sort column
respectively. For example:
sort_col =&gt; ['a','b'], sort_order =&gt; ['ASC', 'DESC']
will sort first in ascending order based on the value of a, then descending
order based on the value of column b. This correlates directly to SQL - it
becomes ``ORDER BY a ASC, b DESC''.
</dd>
<dd>
<p>You can specify a different sort order for roots by using the <a href="#item_roots_order_by"><code>roots_order_by</code></a>
option, when using <code>id =&gt; 0</code>. See below.</p>
</dd>
<p></p>
<dt><strong><a name="item_condition">condition</a></strong><br />
</dt>
<dd>
If you want to limit the results, you can pass a GT::SQL::Condition object into
<code>children()</code> via the condition key. The condition will apply to the select
performed. For example, if you want to select rows with a column ``a'' having a
value less than 20, you could do:
my $cond = GT::SQL::Condition-&gt;new(a =&gt; '&lt;' =&gt; 20)
my $children = $tree-&gt;children(..., condition =&gt; $cond);
</dd>
<p></p>
<dt><strong><a name="item_limit">limit</a></strong><br />
</dt>
<dd>
Like condition, you can specify any valid LIMIT _____ value here, for example
``50, 25''. This option is only used when using <code>id =&gt; 0</code> - it will limit the
number of roots returned, taking into account the sort_col and sort_order.
</dd>
<p></p>
<dt><strong><a name="item_roots_only">roots_only</a></strong><br />
</dt>
<dd>
If you specify this option, it will assume that what you passed in via <a href="#item_id"><code>id</code></a>
consists only of root_ids. Doing so makes a join with the tree table
unneccessary and allows you to use the <a href="#item_select_from"><code>select_from</code></a> option. This option can be
used (and generally this is a good idea) when specifying <code>id =&gt; 0</code>.
</dd>
<p></p>
<dt><strong><a name="item_roots_order_by">roots_order_by</a></strong><br />
</dt>
<dd>
This option controlls the order of root posts, when selecting roots using
<code>id =&gt; 0</code> and a limit. <code>sort_order</code> above will affect the order of
children of the roots, but the order of the roots themselves will be controlled
by whatever <code>ORDER BY</code> value you specify here.
</dd>
<dd>
<p>Again, this option requires that <code>id =&gt; 0</code>, <a href="#item_roots_only"><code>roots_only</code></a>, and <a href="#item_limit"><code>limit</code></a> are
also being used.</p>
</dd>
<dd>
<p>If this option is omitted, the <code>ORDER BY</code> will be generated from the values of
the <code>sort_col</code> and <code>sort_order</code> options.</p>
</dd>
<p></p>
<dt><strong><a name="item_select_from">select_from</a></strong><br />
</dt>
<dd>
If you are using roots_only, you can also specify the <a href="#item_select_from"><code>select_from</code></a> option.
This option allows you to perform the selects from a GT::SQL::Relation object
instead of just the table associated with the tree. Note that the table
associated with the tree must be part of the relation, however you can have as
many other tables as you like.
</dd>
<p></p>
<dt><strong><a name="item_left_join">left_join</a></strong><br />
</dt>
<dd>
If the select_from relation should be a left join, pass <code>left_join =&gt; 1</code>.
This simply passes the <a href="#item_left_join"><code>left_join</code></a> option to -&gt;select. This option is only
applicable when select_from is used.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="parents">parents</a></h2>
<p>This is effectively the opposite of children. Instead of getting back all of the
children nodes, it gives the parents, all the way up to the root for any given
node. The return value is the same as that of <code>children</code>, so see that section.</p>
<p>Each array returned by <code>children</code> is sorted by depth from root to parent.</p>
<dl>
<dt><strong>id</strong><br />
</dt>
<dd>
<a href="#item_id"><code>id</code></a> is the only required parameter for <code>parents()</code>. It should be either a
scalar value or an array reference. You specify the ID's of children whose
parents you are looking for. The type of argument (scalar or array ref) affects
the return in the same way as <code>children()</code>.
</dd>
<p></p>
<dt><strong>cols</strong><br />
</dt>
<dd>
<a href="#item_cols"><code>cols</code></a> works in a similar way to the <a href="#item_cols"><code>cols</code></a> parameter to <code>children</code>. You
specify the columns you want in the return as an array ref. What you get back
will have these columns in it. If <a href="#item_cols"><code>cols</code></a> is not specified, you'll get back all
columns.
</dd>
<dd>
<p>Note that 'tree_id_fk' and the depth column for the table are required fields
and will be added if not specified.</p>
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="child_ids">child_ids</a></h2>
<p>If you are looking for just the ID's of the children of a particular node, you
should use this. The return value is one of the following, depending on what you
pass in:</p>
<p>hash reference of array references:
{ ID =&gt; [ID, ID, ...], ... }
with one ID in the hash reference for each id you specify. The array reference
contains the child ID's of the key ID.</p>
<p>hash reference of hash references:
{ ID =&gt; { ID =&gt; dist, ID =&gt; dist, ... }, ... }
with one ID in the other hash reference for each id you specify. The inner hash
reference is made of child_id =&gt; child_distance key-value pairs.</p>
<p>array reference or hash reference:
[ID, ID, ...]
hash reference:
{ ID =&gt; dist, ID =&gt; dist }</p>
<p>The first two apply when passing in an array reference for <a href="#item_id"><code>id</code></a>, the latter two
when passing a scalar value for <a href="#item_id"><code>id</code></a>. The first and third are without
<a href="#item_include_dist"><code>include_dist</code></a> specified, the second and fourth occur when you specify
<a href="#item_include_dist"><code>include_dist</code></a>.</p>
<dl>
<dt><strong>id</strong><br />
</dt>
<dd>
Like all other accessors, child_ids takes a scalar value or array reference as
the <a href="#item_id"><code>id</code></a> value. Return as noted above.
</dd>
<p></p>
<dt><strong><a name="item_include_dist">include_dist</a></strong><br />
</dt>
<dd>
This changes the return as noted above - instead of just getting an array
reference of child ID's, you get the child ID's as the keys of a hash reference,
and the distances of the child from the parent you requested as the values.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="parent_ids">parent_ids</a></h2>
<p>Exactly the same as child_ids, except that this works <em>up</em> the tree instead of
<em>down</em>. Takes the same arguments, gives the same possible returns.</p>
<p>
</p>
<hr />
<h1><a name="indices">INDICES</a></h1>
<p>A tree requires a few indices to get optimal performance out of it. If the table
is never expected to be more than just a few rows, you won't notice a
substantial difference, however, as with any table, as the table grows the
performance proper indexing provides becomes more appreciable.</p>
<p>Two indices are created automatically on the tree table, one on tree_id_fk, and
the other on tree_anc_id_fk,tree_dist, so you don't need to worry about that
table.</p>
<p>Obviously, the usage of the tree affects how many indices you want, this section
is simply to provide some general guidelines for the indices required.</p>
<p>Because the roots_only option is based solely on the main table and not the
tree, if you are using roots_only (calling children with id =&gt; 0 automatically
turns on the roots_only option), you want to make sure you have an index on the
root column. If you also use the max_depth depth option, add the depth column to
this index.</p>
<p>Keep in mind that you may need to mix other columns in here if you are using a
condition with children(). This also applies when using the <code>sort_col</code> and
<code>sort_order</code> parameters - basically you need to figure out what your indices
are, and then add in the root column and, if using max_depth, the depth column.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Tree.pm,v 1.29 2005/05/31 06:26:32 brewt Exp $</p>
</body>
</html>

View File

@ -0,0 +1,422 @@
<!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>GT::SQL::Tree::Rebuild - Helps to turn a table into one usable by GT::SQL::Tree.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#new__create_a_rebuild_object">new - Create a Rebuild object</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Tree::Rebuild - Helps to turn a table into one usable by GT::SQL::Tree.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::SQL::Tree;
use GT::SQL::Tree::Rebuild;</pre>
<pre>
my $rebuild = GT::SQL::Tree::Rebuild-&gt;new(
table =&gt; $DB-&gt;table('MyTable'),
missing_root =&gt; \&amp;root_code,
missing_father =&gt; \&amp;father_code,
missing_depth =&gt; \&amp;depth_code,
order_by =&gt; 'column_name'
);</pre>
<pre>
$DB-&gt;editor('MyTable')-&gt;add_tree(root =&gt; $root_col, father =&gt; $father_col, depth =&gt; $depth_col, rebuild =&gt; $rebuild);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::SQL::Tree::Rebuild is designed to go hand-in-hand with GT::SQL::Tree and
aids in turning an existing table into one with the neccessary root, father and
depth columns needed by GT::SQL::Tree.</p>
<p>The main purpose is to do a one-shot conversion of a table to make it compatible
with GT::SQL::Tree.</p>
<p>
</p>
<h2><a name="new__create_a_rebuild_object">new - Create a Rebuild object</a></h2>
<p>There is only one method that is called - new. You pass the arguments needed
and get back a GT::SQL::Tree::Rebuild object. This object should then be passed
into GT::SQL::Tree-&gt;create (typically via <code>$editor-&gt;add_tree()</code>)</p>
<p><code>new()</code> takes a hash with up to 4 argument pairs: ``table'' (required), and one or
more of ``missing_root'', ``missing_father'', or ``missing_depth''. The values are
explained below.</p>
<dl>
<dt><strong><a name="item_table">table</a></strong><br />
</dt>
<dd>
Required. You specify the table object for the table to rebuild. For example, if
you are going to add a tree to the ``Category'' table, you provide the ``Category''
table object here.
</dd>
<p></p>
<dt><strong><a name="item_cols">cols</a></strong><br />
</dt>
<dd>
By default, an entire row will be returned. To speed up the process and lower
the memory usage, you can use the <a href="#item_cols"><code>cols</code></a> option, which specifies the columns to
select for $row. It is recommended that you only select columns that you need as
doing so will definately save time and memory.
</dd>
<p></p>
<dt><strong><a name="item_missing_father_2c_missing_root_2c_missing_depth">missing_father, missing_root, missing_depth</a></strong><br />
</dt>
<dd>
Each of these arguments takes a code reference as its value. The arguments to
the code references are as follows:
</dd>
<dl>
<dt><strong><a name="item__24row">$row</a></strong><br />
</dt>
<dd>
The first argument is a hash reference of the row being examined. Your job, in
the code reference, is to examine $row and determine the missing value,
depending on which code reference is being called. missing_root needs to return
the root_id for this row; missing_father needs to return the father_id, and the
missing_depth code reference should return the depth for the row.
</dd>
<p></p>
<dt><strong><a name="item__24table">$table</a></strong><br />
</dt>
<dd>
The second argument passed to the code references is the same table object that
you pass into new(), which you can select from if neccessary.
</dd>
<p></p></dl>
<dt><strong><a name="item_missing_father">missing_father</a></strong><br />
</dt>
<dd>
The <a href="#item_missing_father"><code>missing_father</code></a> code reference is called first - before <a href="#item_missing_root"><code>missing_root</code></a>
and <a href="#item_missing_depth"><code>missing_depth</code></a>. The code reference is called as described above and should
return the ID of the father of the row passed in. A false return (0 or undef) is
interpreted as meaning that this is a root and therefore has no father.
</dd>
<p></p>
<dt><strong><a name="item_missing_root">missing_root</a></strong><br />
</dt>
<dd>
<a href="#item_missing_root"><code>missing_root</code></a> has to return the root of the row passed in. This is called
after <a href="#item_missing_father"><code>missing_father</code></a>, so the $row will contain whatever you returned in
<a href="#item_missing_father"><code>missing_father</code></a> in the father ID column. Of course, this only applies if using
both <a href="#item_missing_root"><code>missing_root</code></a> and <a href="#item_missing_father"><code>missing_father</code></a>.
</dd>
<p></p>
<dt><strong><a name="item_missing_depth">missing_depth</a></strong><br />
</dt>
<dd>
<a href="#item_missing_depth"><code>missing_depth</code></a> has to return the depth of the row passed in. This is called
last, so if you are also using <a href="#item_missing_father"><code>missing_father</code></a> and/or <a href="#item_missing_root"><code>missing_root</code></a>, you
will have whatever was returned by those code refs available in the $row.
</dd>
<p></p>
<dt><strong><a name="item_order_by">order_by</a></strong><br />
</dt>
<dd>
The query done to retrieve records can be sorted using the <a href="#item_order_by"><code>order_by</code></a> option.
It should be anything valid for ``ORDER BY _____''. Often it can be useful to have
your results returned in a certain order - for example:
order_by =&gt; 'depth_column ASC'
would insure that parents come before roots. Of course, this example wouldn't
work if you are using ``missing_depth'' since none of the depth values will be
set.
</dd>
<p></p></dl>
<p>Once you have a GT::SQL::Tree::Rebuild object, you should pass it into
<code>GT::SQL::Tree-&gt;create</code> (which typically involves passing it into
<code>$editor-&gt;add_tree()</code>, which passed it through). Before calculating the
tree, GT::SQL::Tree will call on the rebuild object to reproduce the father,
root, and/or depth columns (whichever you specified).</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Rebuild.pm,v 1.10 2005/04/06 23:11:08 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,720 @@
<!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>GT::SQL::Driver::Types - Column types supported by GT::SQL</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#attributes">ATTRIBUTES</a></li>
<li><a href="#types">TYPES</a></li>
<ul>
<li><a href="#integer_types">Integer types</a></li>
<li><a href="#floatpoint_types">Float-point types</a></li>
<li><a href="#aribtrary_precision_numbers">Aribtrary precision numbers</a></li>
<li><a href="#character_types">Character types</a></li>
<li><a href="#date_time_types">Date/time types</a></li>
<li><a href="#deprecated_types">Deprecated types</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::SQL::Driver::Types - Column types supported by GT::SQL</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $c = $DB-&gt;creator('new_table');
$c-&gt;cols({
column_name =&gt; { type =&gt; 'INT', default =&gt; 42, not_null =&gt; 1, unsigned =&gt; 1 }
# ... more columns ...
});</pre>
<pre>
my $e = $DB-&gt;editor('table_name');
$e-&gt;add_col(column_name2 =&gt; { type =&gt; 'CHAR', size =&gt; 10, default =&gt; 'abc' });</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module should not be used directly, however the documentation here
describes the different types support by GT::SQL and any caveats associated
with those types.</p>
<p>
</p>
<hr />
<h1><a name="attributes">ATTRIBUTES</a></h1>
<p>All types are specified as a <code>column_name =&gt; { column definition }</code> pair,
where the column definition should contain at least a <code>type</code> key containing
one of the <a href="#types">TYPES</a> outlined below. Commonly accepted attributes are:</p>
<dl>
<dt><strong><a name="item_not_null">not_null</a></strong><br />
</dt>
<dd>
Used to specify that a column should not be allowed to contain NULL values.
Note that for character/string data types, a 0-character string (and, for
<a href="#item_char"><code>CHAR</code></a>/<a href="#item_varchar"><code>VARCHAR</code></a> columns, strings containing only spaces), <strong>are</strong> considered
NULL values are are not permitted if the column is specified as <a href="#item_not_null"><code>not_null</code></a>.
The value passed to not_null should be true.
</dd>
<p></p>
<dt><strong><a name="item_default">default</a></strong><br />
</dt>
<dd>
Used to specify a default value to be used for the column when no explicit
value is provided when a row is inserted. The default value is also used for
the value in existing rows when adding a not_null column to an existing table -
in such a case, the <a href="#item_default"><code>default</code></a> is <strong>required</strong>.
</dd>
<dd>
<p>Also see the <a href="#text"><a href="#item_text"><code>TEXT</code></a></a> section regarding caveats and limitations of
using <a href="#item_default"><code>default</code></a>'s for <a href="#item_text"><code>TEXT</code></a> types.</p>
</dd>
<p></p></dl>
<p>Other column attributes are supported as outlined below. In addition to
attributes mentioned in this document, various attributes are available that
influence automatically-generated forms displayed by GT::SQL::Admin - see
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Creator.html">the GT::SQL::Creator manpage</a> for details on these attributes.</p>
<p>
</p>
<hr />
<h1><a name="types">TYPES</a></h1>
<p>
</p>
<h2><a name="integer_types">Integer types</a></h2>
<dl>
<dt><strong><a name="item_tinyint">TINYINT</a></strong><br />
</dt>
<dd>
The <a href="#item_tinyint"><code>TINYINT</code></a> type specifies an 8-bit integer able to handle values from -128
to 127. Some databases will allow larger values due to not supporting an
appropriate data type. The <code>unsigned</code> column attribute <em>may</em> turn this into
an unsigned value supporting values from 0 to 255; due to this type being
implemented as a larger integer type in some databases (which, incidentally,
coincide with the databases not supporting an unsigned 8-bit <a href="#item_tinyint"><code>TINYINT</code></a>) using
an <code>unsigned</code> TINYINT type will result in a column able to store any value
from 0-255, unlike most of the larger integer types below.
</dd>
<p></p>
<dt><strong><a name="item_smallint">SMALLINT</a></strong><br />
</dt>
<dd>
The <a href="#item_smallint"><code>SMALLINT</code></a> type specifies a 16-bit integer able to handle values from
-32768 to 32767. The <code>unsigned</code> column attribute <em>may</em> turn this into an
unsigned value supporting values from 0 to 65535, however this is <strong>not</strong>
guaranteed. If you need to store values in the 32768-65535 range, a larger
type is recommended.
</dd>
<p></p>
<dt><strong><a name="item_mediumint">MEDIUMINT</a></strong><br />
</dt>
<dd>
The <a href="#item_mediumint"><code>MEDIUMINT</code></a> type (only natively supported by MySQL) specifies a 24-bit
integer type able to hold values from -8388608 to 8388607. If the <code>unsigned</code>
column attribute is specified, this allows values from 0 to 16777215. Due to
this being supported with the <code>unsigned</code> attribute, or implemented as a larger
data type, an <code>unsigned</code> <a href="#item_mediumint"><code>MEDIUMINT</code></a> will always supported values up to
16777215.
</dd>
<p></p>
<dt><strong><a name="item_int_2c_integer">INT, INTEGER</a></strong><br />
</dt>
<dd>
The <code>INT</code> type specifies a 32-bit integer able to hold values from -2147483648
to 2147483647. If the <code>unsigned</code> column attribute is specified, the column
<em>may</em> support values from 0 to 4294967295, however this is <strong>not</strong> guaranteed.
If values larger than 2147483647 are needed, using the <a href="#item_bigint"><code>BIGINT</code></a> type below is
recommended. <code>INTEGER</code> is an alias for <code>INT</code>.
</dd>
<p></p>
<dt><strong><a name="item_bigint">BIGINT</a></strong><br />
</dt>
<dd>
The largest integral type, <a href="#item_bigint"><code>BIGINT</code></a> specifies a 64-bit integer value able to
hold values from -9223372036854775808 to 9223372036854775807. If specified as
<code>unsigned</code>, the column <em>may</em> support values from 0 to 18446744073709551616,
but this is <strong>not</strong> guaranteed. If larger values are needed, use the <a href="#item_decimal"><code>DECIMAL</code></a>
type with a <code>scale</code> value of <code>0</code>.
</dd>
<p></p>
<dt><strong><a name="item_back">back</a></strong><br />
</dt>
</dl>
<p>
</p>
<h2><a name="floatpoint_types">Float-point types</a></h2>
<dl>
<dt><strong><a name="item_real_2c_float">REAL, FLOAT</a></strong><br />
</dt>
<dd>
The <code>REAL</code> type specifies a 32-bit floating-point (i.e. fractional) number,
accurate to 23 binary digits (which works out to <em>approximately</em> 6 decimal
digits). The values may be signed, and can range from at least as small as
10^-37 to at least as large as 10^37. For more precise values, the <a href="#item_double"><code>DOUBLE</code></a>
type is recommended. For exact precision (i.e. for monetary values), the
(often slower) <a href="#item_decimal"><code>DECIMAL</code></a> type is recommended. <code>FLOAT</code> is an alias for
<code>REAL</code>.
</dd>
<p></p>
<dt><strong><a name="item_double">DOUBLE</a></strong><br />
</dt>
<dd>
The <a href="#item_double"><code>DOUBLE</code></a> type specifies a 64-bit floating-point (i.e. fractional) number,
accurate to 52 binary digits (<em>approximately</em> 15 decimal digits). The values
may be signed, and can range from at least as small as 10^-307 to at least as
large as 10^308 (except under Oracle - see below). For exact precision (i.e.
for monetary values), the (often slower) <a href="#item_decimal"><code>DECIMAL</code></a> type is recommended.
</dd>
<dd>
<p>Take note that Oracle doesn't properly support the full range supported by
other databases' <a href="#item_double"><code>DOUBLE</code></a> types - the smallest number supported (assuming
precision to digits) is 10^-113 - specifically, the number of digits after the
decimal place may not exceed 128 - so 1.2345678901e-117 is acceptable, while
1.23456789012e-117 is not. The larger number Oracle supports is just less than
1e+126 (i.e. 9.999...e+125), as opposed to other databases' 1e+307. If you
need to store numbers larger or smaller than this amount, you'll have to find
some other way to store your numbers (i.e. Math::BigFloat with a <a href="#item_varchar"><code>VARCHAR</code></a>).</p>
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="aribtrary_precision_numbers">Aribtrary precision numbers</a></h2>
<dl>
<dt><strong><a name="item_decimal">DECIMAL</a></strong><br />
</dt>
<dd>
The <a href="#item_decimal"><code>DECIMAL</code></a> type is provided to support numbers of arbitrary precision. It
requires two attributes, <code>scale</code> and <code>precision</code>, where <code>scale</code> specifies
the number of decimal places, and precision specifies the number of overall
digits. For example, <code>123.45</code> has a <code>precision</code> of 5, and a <code>scale</code> of 2.
<code>42</code> has a <code>precision</code> or 2, and a <code>scale</code> of 0. <code>scale</code> must be less than
<code>precision</code>, and <code>precision</code> must not exceed 38. Also, although the value
stored and retrieved is completely accurate within it's given precision and
scale range, the accuracy available for comparisons (i.e. column = number) is
only reliably accurate to approximately the same level as DOUBLE's - that is,
about 15 digits.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="character_types">Character types</a></h2>
<dl>
<dt><strong><a name="item_char">CHAR</a></strong><br />
</dt>
<dd>
The <a href="#item_char"><code>CHAR</code></a> type is used to specify a string of characters from 1 to 255
characters long. It takes a <code>size</code> attribute which must be 255 or less, and
specifies the size of the column values - if not specified, 255 will be used.
This implementation's <a href="#item_char"><code>CHAR</code></a> type, for historic reasons, <strong>will not</strong> pad
inserted values with spaces, but <strong>may</strong> trim trailing spaces when retrieving
and/or comparing values. Note that this is <strong>not</strong> SQL compliant <a href="#item_char"><code>CHAR</code></a>
behaviour - SQL-compliant <a href="#item_char"><code>CHAR</code></a>'s are padded with spaces up to their size.
</dd>
<dd>
<p>What this ends up meaning is that for everything except MySQL, <a href="#item_char"><code>CHAR</code></a> columns
will be mapped to <a href="#item_varchar"><code>VARCHAR</code></a> columns. Note that even MySQL, which is the only
database for which <a href="#item_char"><code>CHAR</code></a>'s are not automatically mapped into <a href="#item_varchar"><code>VARCHAR</code></a>'s,
will <em>transparently</em> convert <a href="#item_char"><code>CHAR</code></a> columns to <a href="#item_varchar"><code>VARCHAR</code></a> columns if any
non-fixed-size datatype (anything other than a <a href="#item_char"><code>CHAR</code></a> or numeric types) is
used in or added to the table. As a general rule, <a href="#item_varchar"><code>VARCHAR</code></a> is preferred over
<a href="#item_char"><code>CHAR</code></a> except when dealing with columns whose values don't vary significantly
in length <strong>and</strong> are in a table that only contains fixed-size data types
(<a href="#item_char"><code>CHAR</code></a>'s and numeric types). Everywhere else, use <a href="#item_varchar"><code>VARCHAR</code></a>'s, since that's
what you'll be getting anyway.</p>
</dd>
<dd>
<p>A <code>binary</code> attribute is supported, which <em>may</em> indicates that comparisons
with this field should be case-sensitive. Note that this only works on
databases that actually have a case-sensitive <a href="#item_char"><code>CHAR</code></a> field - currently, only
MySQL.</p>
</dd>
<p></p>
<dt><strong><a name="item_varchar">VARCHAR</a></strong><br />
</dt>
<dd>
The <a href="#item_varchar"><code>VARCHAR</code></a> type is identical to the above <a href="#item_char"><code>CHAR</code></a> type <strong>except</strong> as
follows. Unlike a <a href="#item_char"><code>CHAR</code></a>, a <a href="#item_varchar"><code>VARCHAR</code></a> column does not take up <code>size</code> bytes
of storage space - typically the storage space is only slightly larger
(typically 1 byte) than the size of the value stored. As such, <a href="#item_varchar"><code>VARCHAR</code></a>'s
are almost always preferred over columns, except for nearly-constant sized
data, or tables with all fixed-width data types (<a href="#item_char"><code>CHAR</code></a>'s, <code>INT</code>'s, and
non-<a href="#item_decimal"><code>DECIMAL</code></a> numeric types). <a href="#item_varchar"><code>VARCHAR</code></a> columns will not be padded with
whitespace up to <code>size</code>, however trailing whitespace <code>may</code> be trimmed from
values.
</dd>
<dd>
<p>As with <a href="#item_char"><code>CHAR</code></a>, the <code>binary</code> attribute <em>may</em> make the <a href="#item_varchar"><code>VARCHAR</code></a> values
case-sensitive for the matching purposes.</p>
</dd>
<p></p>
<dt><strong><a name="item_text">TEXT</a></strong><br />
</dt>
<dd>
The <a href="#item_text"><code>TEXT</code></a> type is similar to <a href="#item_varchar"><code>VARCHAR</code></a> types, except that they are always
case-insensitive for matching/equality, and can contain longer values. The
<a href="#item_text"><code>TEXT</code></a> type takes a <code>size</code> attribute which contains the length required - if
not provided, a value of approximately 2 billion is used. Note that the
maximum size of the column will usually be larger than the value you specify to
<code>size</code> - it simply indicates to the driver to use a field capable of at least
the size specified. The values of <a href="#item_text"><code>TEXT</code></a> fields are case-insensitive in terms
of matches and equality. The maximum <code>size</code> value, and the default, is
approximately 2 billion.
</dd>
<dd>
<p>Certain aliases are provided with implicit size defaults - <code>TINYTEXT</code>,
<code>SMALLTEXT</code>, <code>MEDIUMTEXT</code>, and <code>LONGTEXT</code>, which are equivelant to <a href="#item_text"><code>TEXT</code></a>
with <code>size</code> values of 255, 65535, 16777215, and 2147483647, respectively.</p>
</dd>
<dd>
<p>Depending on the <code>size</code> value, certain databases _may_ use different
underlying types. MySQL, for example, uses the smallest possible type between
its native <code>TINYTEXT</code>, <a href="#item_text"><code>TEXT</code></a>, <code>MEDIUMTEXT</code>, and <code>LONGTEXT</code> types. As
such, it is recommended that you use a sufficiently large <code>size</code> value unless
absolutely sure that you will never need a larger value.</p>
</dd>
<dd>
<p>Also note that <a href="#item_text"><code>TEXT</code></a> types <strong>do not</strong> support normal equality operations - in
fact, the only portable things that can be done with <a href="#item_text"><code>TEXT</code></a> columns is <code>IS
NULL</code> tests (in GT::SQL this means ``='' <code>undef</code>) and <code>LIKE</code> comparisons - but,
for portability with all supported databases, the argument of a <code>LIKE</code> may not
exceed 4000 characters.</p>
</dd>
<dd>
<p>Also note that the <a href="#item_default"><code>default</code></a> value will be ignored by MySQL, which does not
support having default values on <a href="#item_text"><code>TEXT</code></a> columns. Everything else, however,
will properly support this, and the default will still be used when inserting
with GT::SQL even when using MySQL. Also note that the default value of
<a href="#item_text"><code>TEXT</code></a> types <strong>must not</strong> exceed 3998 characters, due to limits imposed by some
databases. Longer indexes may work in some cases, but are not guaranteed - for
example, a table resync on MSSQL will not work.</p>
</dd>
<p></p>
<dt><strong><a name="item_enum">ENUM</a></strong><br />
</dt>
<dd>
The <a href="#item_enum"><code>ENUM</code></a> type is a MySQL-only type that supports certain fixed string
values. On non-MySQL databases, it is simply mapped to a <a href="#item_varchar"><code>VARCHAR</code></a> column.
It requires a <code>values</code> option which should have a value of an array reference
of string values that the ENUM should permit. The <a href="#item_enum"><code>ENUM</code></a> type is generally
discouraged in favour of a <a href="#item_char"><code>CHAR</code></a>, <a href="#item_varchar"><code>VARCHAR</code></a>, or an
<a href="#integer_types">integral type</a> column, all of which provide more flexibility
(i.e. if you want to add a new possible value) and are not a single
database-specific type.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="date_time_types">Date/time types</a></h2>
<p>All of the date/time types support by MySQL will be handled by GT::SQL, for
compatibility reasons. However, all types other than DATE and <a href="#item_datetime"><code>DATETIME</code></a>
should be considered deprecated as cross-database compatibility is not possible
using these types. In particular, <a href="#item_timestamp"><code>TIMESTAMP</code></a> will work exactly like a
<a href="#item_datetime"><code>DATETIME</code></a> on every non-MySQL database; <a href="#item_time"><code>TIME</code></a> and <a href="#item_date"><code>DATE</code></a> will work in
Postgres just like they do in MySQL; under everything else, <a href="#item_time"><code>TIME</code></a> won't work
at all, and <a href="#item_date"><code>DATE</code></a> will work like <a href="#item_datetime"><code>DATETIME</code></a>.</p>
<p>GT::SQL users are urged to at least consider using an INT column, designed to
contain Perl's <code>time()</code> value, in lieu of any of the Date/time types as it avoids
many problems typically associated with storing local times - such as time zone
issues and non-local databases. That said, if you are certain you want a
Date/time type, a DATETIME is preferred as it will work (almost) the same
everywhere.</p>
<dl>
<dt><strong><a name="item_datetime">DATETIME</a></strong><br />
</dt>
<dd>
A date field, which stores values in <code>YYYY-MM-DD HH:MM:SS</code> format (where
<code>'HH'</code> is a 24-hour hour). Inserted values may omit the seconds
(<code>YYYY-MM-DD HH:MM</code>), or time (<code>YYYY-MM-DD</code>) portions of the value. Omitted
values will default to <code>0</code>.
</dd>
<dd>
<p>Note that <a href="#item_datetime"><code>DATETIME</code></a> values returned from a database <em>may</em> include
fractional-second precision values such as <code>2004-01-01 12:00:07.123</code>.
Currently MSSQL and Postgres exhibit this behaviour. MSSQL's <a href="#item_datetime"><code>DATETIME</code></a> type
always includes exactly three decimal digits, while Postgres' <a href="#item_timestamp"><code>TIMESTAMP</code></a> type,
used for GT::SQL <a href="#item_datetime"><code>DATETIME</code></a>'s, stores times with 6 decimal-digit precision.
Unlike MSSQL, however, Postgres will only display decimal digits if a
significant decimal value has been stored in the database. This happens with
the <code>time_check</code> option, below, and when an explicit fractional second value
has been inserted into the database.</p>
</dd>
<dd>
<p>A <code>time_check</code> attribute may be passed with a true value; if set, any update
to the row that doesn't explicitly set the column will have the column updated
to the <strong>database's</strong> current local time. Due to issues with times and/or
timezones, this option should be considered deprecated and discouraged - it is
recommended instead that you update the value yourself using a value that
<em>your script</em> thinks is local time (or, better yet, use an <code>INT</code> column with
unix time values (i.e. <code>time()</code> in Perl), which are timezone-independent to begin
with), rather than trying to depend on a database having the same time and time
zone as your script.</p>
</dd>
<p></p>
<dt><strong><a name="item_date">DATE</a></strong><br />
</dt>
<dd>
Just like <a href="#item_datetime"><code>DATETIME</code></a>, except (under MySQL and Postgres) it only stores and
returns the <code>YYYY-MM-DD</code> portion of the value. Note that when using this
type, care must be taken to extract only the desired portion of the output as
databases other than MySQL and Postgres map this to a <a href="#item_datetime"><code>DATETIME</code></a> above, which
returns 'YYYY-MM-DD HH:MM:SS' values (with a possible fractional seconds value,
in the case of MSSQL/Postgres). Using a <a href="#item_datetime"><code>DATETIME</code></a> or <code>INT</code> field is
generally preferred, but this type may be slightly more effecient and take
slightly less space (4 bytes instead of 8 bytes) on MySQL and Postgres
databases.
</dd>
<dd>
<p>Like <a href="#item_datetime"><code>DATETIME</code></a>, this handles a <code>time_check</code> field, with the same caveats
described in the the <a href="#item_datetime"><code>DATETIME</code></a> <code>time_check</code> description.</p>
</dd>
<p></p></dl>
<p>The alternate, deprecated date/time types supported are listed in the
<a href="#deprecated_types">Deprecated types</a> section below.</p>
<p>
</p>
<h2><a name="deprecated_types">Deprecated types</a></h2>
<dl>
<dt><strong><a name="item_blob">BLOB</a></strong><br />
</dt>
<dd>
Limited <a href="#item_blob"><code>BLOB</code></a> support (<code>TINYBLOB</code>, <a href="#item_blob"><code>BLOB</code></a>, <code>MEDIUMBLOB</code>, and <code>LONGBLOB</code>)
existed in older versions of GT::SQL, however the support, where it existed at
all, was partial and incomplete. Additionally, only certain drivers (MySQL and
Oracle) supported <a href="#item_blob"><code>BLOB</code></a> types at all. As such, the limited <a href="#item_blob"><code>BLOB</code></a> support
present in old GT::SQL versions is still supported under MySQL and Oracle, but
any new development should avoid them. If you really need to store binary
data, it is strongly recommended that you use files, and simply store
file<em>names</em> in the database.
</dd>
<p></p>
<dt><strong><a name="item_timestamp">TIMESTAMP</a></strong><br />
</dt>
<dd>
This extremely odd MySQL data type, depending on the version of MySQL, stores
times in either the format described in <a href="#item_datetime"><code>DATETIME</code></a> (MySQL 4.1+) or an
extremely MySQL-specific <code>YYYYMMDDhhmmss</code> format. Another MySQL-specific of
this data type is that the first - and ONLY the first - <a href="#item_timestamp"><code>TIMESTAMP</code></a> column in
a row will be automatically updated to the current local timezone-dependent
date and time. Use a <a href="#item_datetime"><code>DATETIME</code></a> (possibly with the <code>time_check</code> option)
instead.
</dd>
<p></p>
<dt><strong><a name="item_time">TIME</a></strong><br />
</dt>
<dd>
A MySQL and Postgres-specific type that stores only the time-of-day in
<code>HH:MM:SS</code> format. Deprecated due to non-portability and incompatibility on
other databases. If you really want to store just the time of day, either use
an <code>INT</code> to store the minutes or seconds since midnight, or use a <a href="#item_char"><code>CHAR</code></a>
which you update with the <code>HH:MM:SS</code> value. Causes a fatal error on databases
which don't have an appropriate native type.
</dd>
<p></p>
<dt><strong><a name="item_year">YEAR</a></strong><br />
</dt>
<dd>
A particularly useless MySQL-specific data type that stores only the year
portion of a date. Use a <a href="#item_smallint"><code>SMALLINT</code></a> instead. Causes a fatal error on
anything other than MySQL.
</dd>
<p></p></dl>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL.html">the GT::SQL manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/SQL/Creator.html">the GT::SQL::Creator manpage</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Types.pm,v 1.2 2004/09/07 20:56:59 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/SQL/Upgrade.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,306 @@
<!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>GT::Session::File - A session management module, with simple data storage/retrieval.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#todo">TODO</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Session::File - A session management module, with simple data storage/retrieval.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>Create a session:
my $session = new GT::Session::File;
my $id = $session-&gt;id();</p>
<p>Save data with the session:
$session-&gt;data (``Save this information!'');</p>
<p>Load a session.
my $session = new GT::Session::File ( $id ) or die ``Can't load session: '$id'.''</p>
<p>Set session directory.
my $session = new GT::Session::File ( directory =&gt; '/path/to/sessions', id =&gt; $id );</p>
<p>Delete a session
$session-&gt;delete();</p>
<p>Cleanup old sessions, takes argument of number of seconds old.
$session-&gt;cleanup ( 5000 );</p>
<p>
</p>
<hr />
<h1><a name="todo">TODO</a></h1>
<p>* Integrate SQL interface into flatfile interface.</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Session/SQL.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,311 @@
<!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>GT::Session::TempTable - A session management module, subclassing GT::Session::SQL providing temp table support</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Session::TempTable - A session management module, subclassing GT::Session::SQL providing temp table support</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>Create a session:
my $session = new GT::Session::TempTable({
db =&gt; GT::SQL-&gt;new( '/path/to/defs' ),
def_path =&gt; '/path/to/defs',
create_session =&gt; \&amp;create_table_sub
});</p>
<p>Create temp table controller table. (do once before using this module)
$session-&gt;initial_create();</p>
<p>Create a new temp table:
my ( $GT_SQL_Table_ref, $tmp_id ) = $session-&gt;new_set();</p>
<p>Get the GT::SQL::Table ref to a previous table:
my $GT_SQL_Table_ref = $session-&gt;get_set( $tmp_id );</p>
<p>List all the sets for current session:
my $href = $session-&gt;list_sets();</p>
<p>Save data with the session:
$session-&gt;data (``Save this information!'');</p>
<p>Load a session.
my $session = new GT::Session::TempTable ( $id ) or die ``Can't load session: '$id'.''</p>
<p>Delete a session:
$session-&gt;delete();</p>
<p>Delete a table set:
$session-&gt;delete_set( $tmp_id );</p>
<p>Cleanup old sessions, takes argument of number of seconds old.
$session-&gt;cleanup ( 5000 );</p>
</body>
</html>

View File

@ -0,0 +1,621 @@
<!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>GT::Socket - A simple internet socket handling interface</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#method_list">Method List</a></li>
<li><a href="#creating_a_new_client_socket">Creating a new Client Socket</a></li>
<li><a href="#limiting_maximum_amount_of_data_downloaded">Limiting maximum amount of data downloaded</a></li>
<li><a href="#limiting_maximum_amount_of_data_uploaded">Limiting maximum amount of data uploaded</a></li>
<li><a href="#limiting_time_taken_to_connect_to_a_host">Limiting time taken to connect to a host</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#autoflush___flag_boolean__">autoflush ( flag BOOLEAN )</a></li>
<li><a href="#close">close</a></li>
<li><a href="#eof">EOF</a></li>
<li><a href="#fh">fh</a></li>
<li><a href="#gulpread___tics_integer__">gulpread ( tics INTEGER )</a></li>
<li><a href="#pending___tics_integer__">pending ( tics INTEGER )</a></li>
<li><a href="#read___number_bytes_integer__">read ( number_bytes INTEGER )</a></li>
<li><a href="#vec_____bits_scalar____">vec ( [ bits SCALAR ] )</a></li>
<li><a href="#write___buffer_scalar__">write ( buffer SCALAR )</a></li>
<li><a href="#creating_a_new_server_socket">Creating a new Server Socket</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#accept">accept</a></li>
<li><a href="#fh">fh</a></li>
<li><a href="#pending___tics_integer__">pending ( tics INTEGER )</a></li>
<li><a href="#vec_____bits_scalar____">vec ( [ bits SCALAR ] )</a></li>
</ul>
<li><a href="#examples">EXAMPLES</a></li>
<ul>
<li><a href="#server">Server</a></li>
<li><a href="#client_for_server">Client for Server</a></li>
</ul>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Socket - A simple internet socket handling interface</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Socket;</pre>
<pre>
my $sock = GT::Socket-&gt;open({
host =&gt; 'www.gossamer-threads.com',
port =&gt; 80
});</pre>
<pre>
$sock-&gt;write(&quot;GET / HTTP/1.0\n\n&quot;);</pre>
<pre>
print &quot;REQUEST RETURNED:\n\n&quot;, $sock-&gt;gulpread(-1);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Socket provides a simple interface for tcp client/server socket services.</p>
<p>
</p>
<h2><a name="method_list">Method List</a></h2>
<p>Object Creation</p>
<pre>
open() Creates a new client socket
server() Creates a new server socket</pre>
<p>Reading and Writing</p>
<pre>
write() Sends all or up to max_up bytes of data to remote
read() Receives an amount or max_down bytes of data from remote
gulpread() Gets all or up to max_down bytes of data from remote</pre>
<p>Socket Administration</p>
<pre>
close() Closes the socket
EOF() Returns open/closed status of socket
autoflush() Sets the socket so that no data is buffered
vec() Sets bits in a bitmask for select calls
pending() Returns true if data/clients awaiting
fh() Returns the raw socket handle</pre>
<p>Server Handling</p>
<pre>
accept() Accepts a incoming client request</pre>
<p>
</p>
<h2><a name="creating_a_new_client_socket">Creating a new Client Socket</a></h2>
<p>To instantiate a new Client Socket connection, the <code>open()</code> method must be
called.</p>
<pre>
my $sock = GT::Socket-&gt;open({
host =&gt; 'hostname', # hostname/ip to connect to
port =&gt; 1234, # port to connect to
max_down =&gt; 0, # maximum number of bytes to download (optional)
max_up =&gt; 0, # maximum number of bytes to upload (optional)
timeout =&gt; 10 # maximum time to wait for host connect (optional)
});</pre>
<p>The parameters are somewhat flexible, to connect to www.gossamer-threads.com on
port 80, any of the following calling methods can be used.</p>
<pre>
my $sock = GT::Socket-&gt;open({
host =&gt; 'www.gossamer-threads.com',
port =&gt; 80
});</pre>
<pre>
my $sock = GT::Socket-&gt;open(
host =&gt; 'www.gossamer-threads.com',
port =&gt; 80
);</pre>
<pre>
my $sock = GT::Socket-&gt;open('www.gossamer-threads.com', 80);</pre>
<pre>
my $sock = GT::Socket-&gt;open('www.gossamer-threads.com:80');</pre>
<p>Note that as port 80 is the HTTP port, and port gets tested and handled with
the getservbyname function, the following can be done:</p>
<pre>
# 'http' here but can be 'pop3', 'telnet', etc. depending on service wanted
my $sock = GT::Socket-&gt;open('www.gossamer-threads.com', 'http');</pre>
<p>Note that if the value passed to <code>open()</code> is a hash ref, with a host and port, a
handful of other options may be set.</p>
<p>
</p>
<h2><a name="limiting_maximum_amount_of_data_downloaded">Limiting maximum amount of data downloaded</a></h2>
<p>This affects the $sock-&gt;<code>read()</code> and the $sock-&gt;<code>gulpread()</code> methods.</p>
<p>The option 'max_down' can be used to put a cap on the number of bytes recieved
through the socket.</p>
<p>For example to limit the number of bytes downloaded to 2k, set max_down to 2048</p>
<pre>
my $sock = GT::Socket-&gt;open(
host =&gt; 'www.gossamer-threads.com',
port =&gt; 80,
max_down =&gt; 2048
);</pre>
<p>WARNING, once the download maximum has been reached, the socket is closed. Then
no more information can be uploaded to the remote host.</p>
<p>
</p>
<h2><a name="limiting_maximum_amount_of_data_uploaded">Limiting maximum amount of data uploaded</a></h2>
<p>The option 'max_up' is used to limit the number of bytes that can be sent to
the remote host.</p>
<p>After the maximum number of bytes is hit, the object will no longer carry out
$sock-&gt;<code>write()</code> requests.</p>
<p>This does not affect the number of bytes that can be downloaded. Until max_down
is hit or the remote host finishes the transmission, the socket will keep
listening.</p>
<p>In the following example. The maximum number of bytes for both download and
upload have been set to 2K.</p>
<p>Keep in mind, with this example, if the maximum download limit is reached
before the maximum upload, the socket will be closed so the remote server will
stop responding to $sock-&gt;<code>write()</code> as well!</p>
<pre>
my $sock = GT::Socket-&gt;open(
host =&gt; 'www.gossamer-threads.com',
port =&gt; 80,
max_down =&gt; 2048,
max_up =&gt; 2048
);</pre>
<p>
</p>
<h2><a name="limiting_time_taken_to_connect_to_a_host">Limiting time taken to connect to a host</a></h2>
<p>When the module tries to connect to a host, if the host is not running or
simply not present, it may take over 30 seconds for the connect call to give
up.</p>
<p>The 'timout' option allows the forcing the waiting period to be a certain
number of seconds. By default, the value is set to 10 seconds.</p>
<p>Since this uses alarm, it will not function on Win32 machines.</p>
<p>With the following example, the module will spend a maximum of 3 seconds trying
to connect to www.gossamer-threads.com.</p>
<pre>
my $sock = GT::Socket-&gt;open(
host =&gt; 'www.gossamer-threads.com',
port =&gt; 80,
timeout =&gt; 3
);</pre>
<p>
</p>
<h2><a name="methods">Methods</a></h2>
<p>The following methods are available to the Client object</p>
<p>
</p>
<h2><a name="autoflush___flag_boolean__">autoflush ( flag BOOLEAN )</a></h2>
<pre>
$sock-&gt;autoflush(1) # turn on flushing
$sock-&gt;autoflush(0) # turn off flushing</pre>
<p>Turns off buffering for the socket. By default, the socket is
autoflushed/buffering turned off.</p>
<p>This prevents peculiar errors like stalling when trying to communicate with
http servers.</p>
<p>
</p>
<h2><a name="close">close</a></h2>
<p>Closes the socket if open.</p>
<p>
</p>
<h2><a name="eof">EOF</a></h2>
<p>Returns true of the socket is closed.</p>
<p>
</p>
<h2><a name="fh">fh</a></h2>
<p>Returns the filehandle.</p>
<p>The return value is file glob, because of this, the upload/download limits
cannot be enforced and the accounting can fall to bits of both the object and
the file glob are being used simultaneously.</p>
<p>
</p>
<h2><a name="gulpread___tics_integer__">gulpread ( tics INTEGER )</a></h2>
<p>Attempts to read all the data it can into a buffer and return. If max_down is
non zero, it will read till the remote closes or the limit has been reached and
returns.</p>
<p>Tics is a non-zero value that will determine how long the function will run for
or wait:</p>
<pre>
$tics Action
----------------------------------------
&gt;0 Wait $tics seconds till returning with results
0 Don't wait, simply get what's there and return
&lt;0 Block, wait until all the data (up to max_down) has been received</pre>
<p>
</p>
<h2><a name="pending___tics_integer__">pending ( tics INTEGER )</a></h2>
<p>Returns true if socket has data pending to be received. Usually this would be
followed with a call to $sock-&gt;<code>gulpread()</code> or $sock-&gt;<code>read()</code></p>
<pre>
$tics Action
----------------------------------------
&gt;0 Wait $tics seconds till returning with results
0 Don't wait, simply get what's there and return
&lt;0 Block, wait until all the data (up to max_down) has been received</pre>
<p>
</p>
<h2><a name="read___number_bytes_integer__">read ( number_bytes INTEGER )</a></h2>
<p>Reads a max of number_bytes from the socket or up to max_down and returns the
result. This is nonblocking so it is possible to get no data or less than the
requested amount.</p>
<p>
</p>
<h2><a name="vec_____bits_scalar____">vec ( [ bits SCALAR ] )</a></h2>
<p>Sets the bits appropriate for the object's socket handle. The returned value
can be used in <code>select(RBITS,WBITS,EBITS,TIMEOUT)</code> function calls.</p>
<p>To test a series of socket handles, vec accepts an already set bit list from
another vec call.</p>
<pre>
$bits = $sock1-&gt;vec();
$bits = $sock2-&gt;vec($bits);
$bits = $sock3-&gt;vec($bits);</pre>
<p>And $bits can now be used to test on all three handles.</p>
<p>
</p>
<h2><a name="write___buffer_scalar__">write ( buffer SCALAR )</a></h2>
<p>Takes the buffer and send it into the socket or up to the max_up limit.</p>
<p>Returns the number of bytes sent.</p>
<p>
</p>
<h2><a name="creating_a_new_server_socket">Creating a new Server Socket</a></h2>
<p>Creating a server socket is almost identical to creating a client socket except
no hostname is specified.
</p>
<pre>
my $server = GT::Socket-&gt;server({
port =&gt; 1234, # port to host services
max_down =&gt; 0, # maximum number of bytes to download (optional)
max_up =&gt; 0, # maximum number of bytes to upload (optional)
timeout =&gt; 10 # maximum time to wait for host connect (optional)
});</pre>
<p>The only option that affects the server directly is the port. The optional
values, max_down, max_up, and timeout are passed on to the child socket when
the server accepts a new connection.</p>
<p>
</p>
<h2><a name="methods">Methods</a></h2>
<p>The following methods are available to the Client object</p>
<p>
</p>
<h2><a name="accept">accept</a></h2>
<p>Accepts an incoming connection and returns a GT::Socket client object for
further interations with the client.</p>
<p>
</p>
<h2><a name="fh">fh</a></h2>
<p>Returns the filehandle.</p>
<p>
</p>
<h2><a name="pending___tics_integer__">pending ( tics INTEGER )</a></h2>
<p>Returns true if server has awaiting connections. Usually this would be followed
with a call to $server-&gt;accept();</p>
<pre>
$tics Action
----------------------------------------
&gt;0 Wait $tics seconds till returning with results
0 Don't wait, simply get what's there and return
&lt;0 Block, wait until all the data (up to max_down) has been received</pre>
<p>
</p>
<h2><a name="vec_____bits_scalar____">vec ( [ bits SCALAR ] )</a></h2>
<p>Sets the bits appropriate for the object's socket handle. The returned value
can be used in <code>select(RBITS,WBITS,EBITS,TIMEOUT)</code> function calls.</p>
<p>To test a series of socket handles, vec accepts an already set bit list from
another vec call.</p>
<pre>
$bits = $sock1-&gt;vec();
$bits = $sock2-&gt;vec($bits);
$bits = $sock3-&gt;vec($bits);</pre>
<p>And $bits can now be used to test on all three handles.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>
</p>
<h2><a name="server">Server</a></h2>
<pre>
use GT::Socket;</pre>
<pre>
my $server = GT::Socket-&gt;server({
port =&gt; 7890
});</pre>
<pre>
while (1) {
if ($server-&gt;pending(-1)) {
print &quot;Accepting a connection\n&quot;;
my $sock = $server-&gt;accept();
$sock-&gt;write(&quot;The time is: &quot; . localtime() . &quot;\n&quot;);
}
}</pre>
<p>
</p>
<h2><a name="client_for_server">Client for Server</a></h2>
<pre>
use GT::Socket;</pre>
<pre>
my $client = GT::Socket-&gt;open(&quot;localhost:7890&quot;);
print &quot;Server Said: &quot;, $client-&gt;gulpread(-1);</pre>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Socket.pm,v 1.43 2004/08/23 20:07:44 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,528 @@
<!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>GT::Socket::Client - Socket module designed for TCP clients</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#open">open</a></li>
<li><a href="#readline">readline</a></li>
<li><a href="#readblock">readblock</a></li>
<li><a href="#readall">readall</a></li>
<li><a href="#readalluntil">readalluntil</a></li>
<li><a href="#select_time">select_time</a></li>
<li><a href="#read_wait">read_wait</a></li>
<li><a href="#write">write</a></li>
<li><a href="#eol">eol</a></li>
<li><a href="#error">error</a></li>
<li><a href="#iaddr">iaddr</a></li>
<li><a href="#port">port</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Socket::Client - Socket module designed for TCP clients</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Socket::Client qw/:crlf/;</pre>
<pre>
my $socket = GT::Socket::Client-&gt;open(
host =&gt; &quot;gossamer-threads.com&quot;,
port =&gt; &quot;shell&quot;, # AKA port 514
timeout =&gt; 10
) or die GT::Socket::Client-&gt;error;</pre>
<pre>
# $socket is now a socket connected to the host. Use
# it as you would use any socket.
$sock-&gt;readline(my $line);
print &quot;Read this line from the socket: $line&quot;;
print $sock &quot;That line&quot; . CRLF;</pre>
<pre>
$sock-&gt;readblock(my $block, 4096);
print &quot;Read 4KB from the socket: $block&quot;;
print $sock &quot;QUIT&quot; . CRLF;</pre>
<pre>
$sock-&gt;readall(my $all);
print &quot;Everything else from the socket: $all&quot;;
print $sock &quot;Something else&quot; . CRLF;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module is a basic socket module that is designed to only handle basic
socket connection and simple read capabilities. Anything else that you want to
do with the socket is entirely up to you - this doesn't try to support
superfluous options that only a few connections will ever use, or options that
should be done in the code using this module instead of the module itself. See
the GT::WWW::http and GT::WWW::https modules for a good working example.</p>
<p>By default, GT::Socket::Client exports nothing, however it can export the LF,
CR, CRLF, $LF, $CR, and $CRLF constants, individually, or together via the
':crlf' export tag.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>
</p>
<h2><a name="open">open</a></h2>
<p>Takes a hash (not hash reference) of socket options, as follows:</p>
<dl>
<dt><strong><a name="item_host">host</a></strong><br />
</dt>
<dd>
[REQUIRED] The name or IP of the host to connect to.
</dd>
<p></p>
<dt><strong><a name="item_port">port</a></strong><br />
</dt>
<dd>
[REQUIRED] The numeric value (25) or service name (``smtp'') of the port to
connect to.
</dd>
<p></p>
<dt><strong><a name="item_ssl">ssl</a></strong><br />
</dt>
<dd>
[OPTIONAL] If this option is provided, the connection will use SSL. Note that
this requires the Net::SSLeay module.
</dd>
<p></p>
<dt><strong><a name="item_timeout">timeout</a></strong><br />
</dt>
<dd>
[OPTIONAL] A connection timeout period, in integral seconds. Note that this is
only supported on systems that support the <code>alarm()</code> function; on other systems
(such as Windows), this argument has no effect.
</dd>
<p></p>
<dt><strong><a name="item_non_blocking">non_blocking</a></strong><br />
</dt>
<dd>
[OPTIONAL] Before returning it to you, the connected socket will be set up as
non-blocking if this option is enabled. Note that this option <strong>DOES NOT WORK</strong>
with the ssl option, due to the Net::SSLeay interface.
</dd>
<p></p>
<dt><strong><a name="item_autoflush">autoflush</a></strong><br />
</dt>
<dd>
[OPTIONAL] Before returning to you, the connected socket will be made non-
buffering. If you want your socket to be buffered, pass in autoflush with a
false value.
</dd>
<p></p>
<dt><strong>ssl</strong><br />
</dt>
<dd>
[OPTIONAL] GT::Socket::Client has the ability to establish an SSL connection to
a server for protocols such as HTTPS, SMTPS, POP3S, IMAPS, etc. Note that it
currently has a limitation of not being able to change to or from an SSL
connection once the connection is established, for protocols like FTPS.
</dd>
<p></p>
<dt><strong><a name="item_debug">debug</a></strong><br />
</dt>
<dd>
[OPTIONAL] If debugging is enabled, internal warnings (such as invalid port,
unresolvable host, connection failure, etc.) will be warn()ed. This does not
affect the <code>error()</code> method, which will always be set to the error message when
a problem occurs. Provide a true value if you want the warn()s to appear.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="readline">readline</a></h2>
<p>This method reads a single line from the socket. It takes one argument, which
must be a scalar which will be set to the line read. See the <code>eol()</code> method,
which allows you to specify an EOL character other than ``\012''. Note that on a
blocking socket, this will block until it can read a full line (or the server
closes the connection). On a non-blocking socket, the amount of time it will
wait for input is dependent on the value of the <code>read_wait()</code> method.</p>
<p>1 is returned on success, undef on failure.</p>
<p>
</p>
<h2><a name="readblock">readblock</a></h2>
<p>This method attempts to read a certain number of bytes from the server. This
takes two arguments: like readline(), the first argument is a scalar that will
be set to the data read. The second argument is the amount of data that may be
read. Note that on a blocking socket, this will block until the required
amount of data is read, or the socket is closed. On a non-blocking socket, this
will return once the requested amount of data is read, the socket closes, or
there is no input for <code>read_wait</code> seconds (See <a href="#read_wait">read_wait</a>).</p>
<p>Note that a block size of -1 makes the socket read until the connection is
closed, in the case of blocking sockets, or until the <code>read_wait()</code> is hit.</p>
<p>The number of bytes read is returned on success, undef on failure.</p>
<p>
</p>
<h2><a name="readall">readall</a></h2>
<p>A synonym for <code>$obj-&gt;readblock($_[0], -1)</code> - in other words, it reads all
available data (waiting for up to <code>read_wait</code> seconds, if non-blocking).</p>
<p>
</p>
<h2><a name="readalluntil">readalluntil</a></h2>
<p>A useful function for non-blocking sockets (completely useless for blocking
sockets, on which it simply becomes a readall call). Basically, this works
like readall(), above, but it will terminate immediately if it encounters a
pattern that you provide on the end of the data read. Note that this does NOT
work as a delimiter, but is useful for protocols such as POP3 when you want to
read as much as you can, but know what should be at the end of what you read.
The sole advantage of this is that it allows you to avoid the read_wait timeout
that would otherwise be required at the end of a data stream.</p>
<p>It takes two arguments - the first is a string or array reference of strings
containing the trailing string data. The second is a scalar that will be set
to the data read. For example, for POP3 you might use: <code>&quot;\n.\r\n&quot;</code>. You can
optionally pass in a third argument, which is used during the first read - if
the result of the first read is equal to the string passed in, it's returned.
Using the POP3 example again, this might be <code>&quot;.\r\n&quot;</code> - to handle an empty
response.</p>
<p>
</p>
<h2><a name="select_time">select_time</a></h2>
<p>[Non-blocking sockets only] This adjusts the number of seconds passed to
<code>select()</code> to poll the socket for available data. The default value is 0.05,
which should work in most situations.</p>
<p>
</p>
<h2><a name="read_wait">read_wait</a></h2>
<p>[Non-blocking sockets only] This method is used to set the wait time for reads.
On a local or very fast connection, this can be set to a low value (i.e. 0.1
seconds), but on a typical slower internet connection, longer wait times for
reading are usually necessary. Hence, the default is a wait time of 5 seconds.
In effect, an attempt to read all data will end after nothing has been received
for this many seconds.</p>
<p>
</p>
<h2><a name="write">write</a></h2>
<p>Sends data to the server. Takes the data to send. This does The Right Thing
for either non-blocking or blocking sockets.</p>
<p>
</p>
<h2><a name="eol">eol</a></h2>
<p>This method takes one or more character, and uses it for the EOL <code>character(s)</code>
used by readline. If called without any argument, the EOL character for the
current object is returned.</p>
<p>
</p>
<h2><a name="error">error</a></h2>
<p>If an error (such as connection, socket, etc.) occurs, you can access it via
the <code>error()</code> method. This can be called as either a class or instance method,
since <code>open()</code> return <code>undef</code> instead of an object if the connection fails.</p>
<p>
</p>
<h2><a name="iaddr">iaddr</a></h2>
<p>Once a connection has been established, you can call this method to get the
iaddr value for the connection. This value is as returned by
<em>Socket.pm</em>'s inet_aton function.</p>
<p>
</p>
<h2><a name="port">port</a></h2>
<p>Once a connection has been established, this method can be used to determine
the port connected to. Note that this is not necessarily the same as the value
of the <a href="#item_port"><code>port</code></a> option passed to <code>open()</code> - the return value of this function will
always be numeric (e.g. <code>25</code>), even if a service name (e.g. <code>&quot;smtp&quot;</code>) was
passed to open().</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Socket.html">the GT::Socket manpage</a> - A socket module made for Links SQL.</p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Client.pm,v 1.15 2004/02/17 01:33:07 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Socket/Client/SSLHandle.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,441 @@
<!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>GT::Tar - Perl module to manipulate tar files.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#creating_a_tar_file">Creating a tar file</a></li>
<li><a href="#opening_an_existing_tar_file">Opening an existing tar file</a></li>
<li><a href="#untarring_a_tar_file">Untarring a tar file</a></li>
<li><a href="#adding_files_to_a_tar_file">Adding files to a tar file</a></li>
<li><a href="#getting_a_list_of_files_in_a_tar">Getting a list of files in a tar</a></li>
<li><a href="#getting_an_individual_file_from_a_tar">Getting an individual file from a tar</a></li>
<li><a href="#removing_a_file_from_a_tar">Removing a file from a tar</a></li>
<li><a href="#gt__tar__part">GT::Tar::Part</a></li>
</ul>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Tar - Perl module to manipulate tar files.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Tar;
my $tar = GT::Tar-&gt;open('foo.tar');
$tar-&gt;add_file( '/path/to/file' );
$tar-&gt;write;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Tar provides an OO intefrace to a tar file. It allows you to create or edit
tar files, and if you have Compress::Zlib installed, it allows you to work with
.tar.gz files as well!</p>
<p>
</p>
<h2><a name="creating_a_tar_file">Creating a tar file</a></h2>
<p>To create a tar file, you simply call:</p>
<pre>
my $tar = new GT::Tar;</pre>
<p>and then to save it:</p>
<pre>
$tar-&gt;write('filename.tar');</pre>
<p>will save the tar file and any files you have added.</p>
<p>
</p>
<h2><a name="opening_an_existing_tar_file">Opening an existing tar file</a></h2>
<p>To open a tar file you call:</p>
<pre>
my $tar = GT::Tar-&gt;open('/path/to/file.tar')
or die &quot;Can't open: $GT::Tar::error&quot;;</pre>
<p>Note: the tar object keeps an open filehandle to the file, so if you are on
windows, you may not be able to manipulate it until you call $tar-&gt;close_tar, or
the tar object goes out of scope.</p>
<p>
</p>
<h2><a name="untarring_a_tar_file">Untarring a tar file</a></h2>
<p>To untar a tar file, you can simply call:</p>
<pre>
$tar-&gt;untar( \&amp;code_ref );</pre>
<p>or as a class method</p>
<pre>
GT::Tar-&gt;untar('/path/to/tar.tar', \&amp;code_ref );</pre>
<p>The code ref is optional. If provided, you will get passed in the a
GT::Tar::Part object before the file is extracted. This lets you change the
path, or alter any attributes of the file before it is saved to disk.</p>
<p>Alternatively, instead of a code reference you may pass an extraction path - if
passed, all files will be extracted relative to that path.</p>
<p>
</p>
<h2><a name="adding_files_to_a_tar_file">Adding files to a tar file</a></h2>
<p>To add a file:</p>
<pre>
$tar-&gt;add_file( '/path/to/file' );</pre>
<p>Note, if you add a directory, the tar module will recurse and add all files in
that directory.</p>
<p>To add a file that isn't saved:</p>
<pre>
$tar-&gt;add_data( name =&gt; 'Filename', body =&gt; 'File body' );</pre>
<p>You can pass in either a scalar for the body, or an opened file handle.</p>
<p>
</p>
<h2><a name="getting_a_list_of_files_in_a_tar">Getting a list of files in a tar</a></h2>
<p>To get a list of files in a tar:</p>
<pre>
my $files = $tar-&gt;files;</pre>
<p>This returns an array ref of GT::Tar::Part objects. See below for how to access
information from a part.</p>
<p>Note: if you change a part, it will update the tar file if you save it.</p>
<p>
</p>
<h2><a name="getting_an_individual_file_from_a_tar">Getting an individual file from a tar</a></h2>
<p>If you know the name of the file you want:</p>
<pre>
my $file = $tar-&gt;get_file('Filename');</pre>
<p>will return a single GT::Tar::Part object.</p>
<p>
</p>
<h2><a name="removing_a_file_from_a_tar">Removing a file from a tar</a></h2>
<p>To remove a file, you need to know the name of it:</p>
<pre>
$tar-&gt;remove_file('Filename');
$tar-&gt;write;</pre>
<p>and you need to save it before the change will take affect.</p>
<p>
</p>
<h2><a name="gt__tar__part">GT::Tar::Part</a></h2>
<p>Each file is a separate part object. The part object has the following
attributes:</p>
<pre>
name file name
mode file permissions
uid user id
gid group id
size file size
mtime last modified time
type file type
body file body</pre>
<p>You can access or set any of these attributes by just using the attribute name
as the method (as it inherits from <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Base.html">the GT::Base manpage</a>).</p>
<p>You can also call:</p>
<pre>
$file-&gt;write;</pre>
<p>or:</p>
<pre>
$file-&gt;write(&quot;/extraction/path&quot;)</pre>
<p>and the file will be created with the given attributes. Basically untar just
foreach's through each of the objects and calls <code>write()</code> on it.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>To create a new tar and add two directories to it, and save it in
'/tmp/foo.tar';</p>
<pre>
my $tar = new GT::Tar;
$tar-&gt;add_file( '/home/httpd/html' );
$tar-&gt;add_file( '/home/backup' );
$tar-&gt;write('/tmp/foo.tar');</pre>
<p>To open an existing tar file and save all the .pl files in /home/alex.</p>
<pre>
my $tar = GT::Tar-&gt;open('files.tar');
my $files = $tar-&gt;files;
foreach my $file (@$files) {
my $name = $file-&gt;name;
if ($name =~ m,[^/]*\.pl$,) {
$file-&gt;write(&quot;/home/alex&quot;);
}
}</pre>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Tar.pm,v 1.54 2005/03/09 01:26:17 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,338 @@
<!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>GT::TempFile - implements a very simple temp file.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::TempFile - implements a very simple temp file.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $file = new GT::TempFile;
open (FILE, &quot;&gt; $file&quot;);
print FILE &quot;somedata&quot;;
close FILE;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::TempFile implements a very simple temp file system that will remove
itself once the variable goes out of scope.</p>
<p>When you call new, it creates a random file name and looks for a
tmp directory. What you get back is an object that when dereferenced
is the file name. You can also pass in a temp dir to use:</p>
<pre>
my $file = new GT::Tempfile '/path/to/tmpfiles';</pre>
<p>Other option you may use are:
my $file = new GT::TempFile(
destroy =&gt; 1,
prefix =&gt; '',
tmp_dir =&gt; '/tmp'
);</p>
<p>When the object is destroyed, it automatically unlinks the temp file
unless you specify <em>destroy</em> =&gt; 0.</p>
<p><em>prefix</em> will be prepended to the start of all temp files created
and the lock directory that is created. It is used to keep programs
using the tempfile module that do not have the temp files destroyed
from clashing.</p>
<p><em>tmp_dir</em> is the same as calling new with just one argument, it is
the directory where files will be stored.</p>
<p>TempFile picks a temp directory based on the following:</p>
<pre>
1. ENV{GT_TMPDIR}
2. ~/tmp
3. ENV{TMPDIR}, ENV{TEMP}, ENV{TMP}
4. /usr/tmp, /var/tmp, c:/temp, /tmp, /temp,
/WWW_ROOT, c:/windows/temp, c:/winnt/temp</pre>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: TempFile.pm,v 1.36 2005/03/23 04:27:26 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,550 @@
<!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>GT::Template - Gossamer Threads template parser</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#template_syntax">Template Syntax</a></li>
<li><a href="#parse">parse</a></li>
<li><a href="#parse_print">parse_print</a></li>
<li><a href="#parse_stream">parse_stream</a></li>
<li><a href="#parse_options">Parse Options</a></li>
<ul>
<li><a href="#filename">Filename</a></li>
<li><a href="#variables">Variables</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#aliases">Aliases</a></li>
</ul>
<li><a href="#vars">vars</a></li>
</ul>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Template - Gossamer Threads template parser</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Template;
my $var = GT::Template-&gt;parse('file.txt', { key =&gt; 'value' });
...
print $var;</pre>
<p>or</p>
<pre>
use GT::Template;
GT::Template-&gt;parse_print('file.txt', { key =&gt; 'value' });</pre>
<p>or</p>
<pre>
use GT::Template;
GT::Template-&gt;parse_stream('file.txt', { key =&gt; 'value' });</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Template provides a simple way (one line) to parse a template (which
can be either a file or a string) and make sophisticated replacements.</p>
<p>It supports simple replacements, conditionals, function calls, including other
templates, and more.</p>
<p>Additionally, through using pre-compiled files, subsequent parses of a template
will be very fast.</p>
<p>
</p>
<h2><a name="template_syntax">Template Syntax</a></h2>
<p>The template syntax documentation has moved - it is now documented in
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Tutorial.html">the GT::Template::Tutorial manpage</a>.</p>
<p>
</p>
<h2><a name="parse">parse</a></h2>
<p>This option parses a template, and returns the value of the parsed template.
See <a href="#parse_options">Parse Options</a> for a description of the possible parse parameters.</p>
<p>
</p>
<h2><a name="parse_print">parse_print</a></h2>
<p>This option parses a template, and prints it. See <a href="#parse_options">Parse Options</a> for a
description of the possible parse_print parameters.</p>
<p>
</p>
<h2><a name="parse_stream">parse_stream</a></h2>
<p>This option parses a template, and prints each part of it as the parse occurs.
It should only be used in situations where streaming content is required as it
is measurably slower than the parse_print alternative. See <a href="#parse_options">Parse Options</a>
for a description of the possible parse_stream parameters.</p>
<p>
</p>
<h2><a name="parse_options">Parse Options</a></h2>
<p>
</p>
<h3><a name="filename">Filename</a></h3>
<p>The first argument to <code>parse()/parse_print()/parse_stream()</code> (hereafter referred
to simply as <code>parse())</code> is the full or relative (to the current working
directory) path to the file to parse.</p>
<p>
</p>
<h3><a name="variables">Variables</a></h3>
<p>The second argument is a hash reference of template variables that will be
available in the parsed template (see <a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Tutorial.html">the GT::Template::Tutorial manpage</a>). Arbitrary
hash/array data structure access is supported (see
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Tutorial.html#advanced_variables_using_references">Advanced variables using references in the GT::Template::Tutorial manpage</a>).</p>
<p>Loops are supported by providing an array reference or code reference as a
value; array reference loops are generally preferred as they enable the loop to
be used multiple times and support the &lt;%loopvar.length%&gt; syntax.</p>
<p>
</p>
<h3><a name="options">Options</a></h3>
<p>The third argument (which is not required) takes additional options that change
the way a parse is performed. The available options (there are more, however
their use is discouraged) are as follows.</p>
<ul>
<li><strong><a name="item_string__3d_3e__24template">string =&gt; $template</a></strong><br />
</li>
Passing in <a href="#item_string__3d_3e__24template"><code>string =&gt; $template</code></a> will use $template as for the template
content instead of reading the file specified as the first <code>parse()</code> argument.
If provided, the first argument to <code>parse()</code> (the filename) is ignored.
<p></p>
<li><strong><a name="item_compress__3d_3e_1">compress =&gt; 1</a></strong><br />
</li>
Setting compress =&gt; 1 will compress all white space generated by the program.
This is usually acceptable for HTML, reducing page sizes by typically 10-20%,
but should not be used for non-HTML templates. The default is 0 (no
compression). This option has no effect when using parse_stream().
<p></p>
<li><strong><a name="item_strict__3d_3e_0">strict =&gt; 0</a></strong><br />
</li>
If set to 1, attempting to use a tag that does not exist will display an
``Unknown tag 'tagname''' error. If strict is set to 0, using an unset tag will
not display anything.
<p></p>
<li><strong><a name="item_escape__3d_3e_1">escape =&gt; 1</a></strong><br />
</li>
If enabled, this option will cause all variables to be HTML escaped before
being included on a page. Enabling this option is strongly recommended.
all variables before they are printed. Tag values that should not be escaped
should be passed as scalar references (\$foo or \'&lt;html&gt;').
<p>This option currently defaults to 0, but may eventually change to 1 - so
passing an explicit 1 or 0 value is strongly recommended.</p>
<p></p>
<li><strong><a name="item_disable__3d_3e__7b__2e_2e_2e__7d">disable =&gt; { ... }</a></strong><br />
</li>
This can be used to disable certain GT::Template functionality. To disable a
particular feature, the hash reference passed to disable should contain a
<code>feature_name</code> with a <code>1</code> value, unless otherwise indicated. Feature names
are as follows:
<ul>
<li><strong><a name="item_functions">functions</a></strong><br />
</li>
This can be used to disable Package::function calls, such as
<code>&lt;%Some::Package::function%&gt;</code>. Note, however, that this does _not_
disable aliased function calls (see below).
<p></p>
<li><strong><a name="item_function_args">function_args</a></strong><br />
</li>
This disables any function calls that specify arguments - for instance,
<code>&lt;%Some::Package::function(1)&gt;</code>. Note that this does _not_ disable
passing arguments to aliased function calls (see below).
<p></p>
<li><strong><a name="item_function_restrict">function_restrict</a></strong><br />
</li>
This can be used to restrict function calls by limiting the available
functions. It takes a regular expression as an argument, which will be tested
against the fully qualified function name - any function that does not match
the regular expression will not be called. For example, to only allow
functions in 'Package::One' and 'Second::Package' to be called, you could use:
<pre>
function_restrict =&gt; '^(?:Package::One|Second::Package)::\w+$'</pre>
<p>Like the above options, this does not restrict aliased function calls.</p>
<p></p>
<li><strong><a name="item_coderefs_args">coderefs_args</a></strong><br />
</li>
This can be specified to disable the calling of code reference variables with
arguments. Tags such as <code>&lt;%coderefname%&gt;</code> and
<code>&lt;%coderefname()%&gt;</code> will be allowed, but <code>&lt;%coderefname(1)%&gt;</code>
will not.
<p></p>
<li><strong><a name="item_alias_args">alias_args</a></strong><br />
</li>
This option can be used to disable the passing of arguments to aliased function
calls (see below).
<p></p></ul>
<li><strong><a name="item_pkg_chop">pkg_chop</a></strong><br />
</li>
When calling a function such as &lt;%Package::A::B::function%&gt;, GT::Template will
first attempt to load Package/A/B.pm, then, if it fails, Package/A.pm, and so
on down to Package.pm, looking for Package::A::B::function in each file. This
behaviour is slow and often undesirable - it is recommended to properly split
up packages (that is, putting Package::A::B inside Package/A/B.pm instead of
Package/A.pm or Package.pm). The ``package chopping'' occurs if pkg_chop is set
to 1 (currently the default, but may change), and does not occur if pkg_chop is
set to 0 (recommended, but not the default for historic reasons).
<p></p>
<li><strong><a name="item_heap">heap</a></strong><br />
</li>
If this is set, it will be added to the end of any other arguments passed to
functions called.
<p></p>
<li><strong><a name="item_func_code">func_code</a></strong><br />
</li>
When calling a function such as &lt;%Package::function%&gt;, you can override the
default behaviour of simply calling the function by providing a code reference
to <a href="#item_func_code"><code>func_code</code></a>. Instead of calling Package::function(), your code reference
will be called with the string of the package to call (e.g.
'Package::function') and the arguments that would have been passed to the
function. The return value of your code will be used as if it was the return
value from the real function.
<p></p>
<li><strong><a name="item_begin">begin</a></strong><br />
</li>
<li><strong><a name="item_end">end</a></strong><br />
</li>
<a href="#item_begin"><code>begin</code></a> and <a href="#item_end"><code>end</code></a> can be used to change the characters that start and end a
template tag. These default to <code>&lt;%</code> for <a href="#item_begin"><code>begin</code></a>, and <code>%&gt;</code> for
<a href="#item_end"><code>end</code></a>. For example, if you changed <a href="#item_begin"><code>begin</code></a> to <code>[*</code> and <a href="#item_end"><code>end</code></a> to <code>*]</code>, you
would use <code>[*tagname*]</code> for a normal tag, <code>[*-- comment --*]</code> for a comment,
etc.
<p></p></ul>
<p>
</p>
<h3><a name="aliases">Aliases</a></h3>
<p>The forth option to parse is an optional hash of aliases to set up for
functions. The key should be the alias name and the value should be the
function to call when the alias is invoked. For example:</p>
<pre>
print GT::Template-&gt;parse(
'file.htm',
{ key =&gt; 'value' },
{ compress =&gt; 1 },
{ myfunc =&gt; 'Long::Package::Name::To::myfunc' }
);</pre>
<p>Now in your template you can do:</p>
<pre>
&lt;%myfunc('argument')%&gt;</pre>
<p>Which will call <code>Long::Package::Name::To::myfunc</code>.</p>
<p>
</p>
<h2><a name="vars">vars</a></h2>
<p>Accessing variables from outside a template can be done by calling the
<code>GT::Template-&gt;vars</code> method. For further details, please see
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Vars.html">the GT::Template::Vars manpage</a>.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<p>Parse the string contained in $template, making the 'key' tag available.</p>
<pre>
my $parsed = GT::Template-&gt;parse(undef, { key =&gt; 'value' }, { string =&gt; $template });</pre>
<p>Parse file.txt, compress the result, and print it. This is equivelant to
<code>print GT::Template-&gt;parse(...)</code>, but slightly faster.</p>
<pre>
GT::Template-&gt;parse_print('file.txt', { key =&gt; 'value' }, { compress =&gt; 1 });</pre>
<p>Print the output of the template it as it is parsed, not after entirely parsed.
This will output the same as the above command would without the ``compress''
option, but is slower (unless, of course, streaming is needed).</p>
<pre>
GT::Template-&gt;parse_stream('file.txt', { key =&gt; 'value' });</pre>
<p>Don't display warnings on invalid keys:</p>
<pre>
GT::Template-&gt;parse_print('file.txt', { key =&gt; 'value' }, { strict =&gt; 0 });</pre>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Tutorial.html">the GT::Template::Tutorial manpage</a> - Documentation/tutorial for GT::Template template
tags.</p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Vars.html">the GT::Template::Vars manpage</a> - Interface for accessing/manipulating template tags from
Perl code.</p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Inheritance.html">the GT::Template::Inheritance manpage</a> - Documentation for GT::Template template
inheritance.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2005 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Template.pm,v 2.142 2005/07/05 00:39:40 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,311 @@
<!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>GT::Template::Editor - This module provides an easy way to edit templates.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Template::Editor - This module provides an easy way to edit templates.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>Should be called like:</p>
<pre>
require GT::Template::Editor;
my $editor = new GT::Template::Editor (
root =&gt; $CFG-&gt;{admin_root_path} . '/templates',
default_dir =&gt; $CFG-&gt;{build_default_tpl},
backup =&gt; 1,
cgi =&gt; $IN
);
return $editor-&gt;process;</pre>
<p>and it returns a hsah ref of variables used for displaying a template editor page.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Editor.pm,v 2.19 2004/10/19 23:34:44 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,445 @@
<!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>GT::Template::Inheritance - Provides GT::Template inheritance/local file
determination.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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="#inheritance">Inheritance</a></li>
<li><a href="#inheriting_from_multiple_locations">Inheriting from multiple locations</a></li>
</ul>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#get_path">get_path</a></li>
<li><a href="#get_all_paths">get_all_paths</a></li>
<li><a href="#tree">tree</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Template::Inheritance - Provides GT::Template inheritance/local file
determination.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::Template::Inheritance;</pre>
<pre>
my $file = GT::Template::Inheritance-&gt;get_path(
file =&gt; &quot;foo.htm&quot;,
path =&gt; &quot;/path/to/my/template/set&quot;
);</pre>
<pre>
my @files = GT::Template::Inheritance-&gt;get_all_paths(
file =&gt; &quot;foo.htm&quot;,
path =&gt; &quot;/path/to/my/template/set&quot;
);</pre>
<pre>
my @paths = GT::Template::Inheritance-&gt;tree(
path =&gt; &quot;/path/to/my/template/set&quot;
);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::Template::Inheritance provides an interface to accessing files for
GT::Template template parsing and include handling. It supports following
inheritance directories and respects ``local'' template directories.</p>
<p>
</p>
<h2><a name="inheritance">Inheritance</a></h2>
<p>GT::Template inheritance works by looking for a .tplinfo file in the template
directory (or local/.tplinfo, if it exists). In order for the template
directory to inherit from another template directory, this file must exist and
must evaluate to a hash reference containing an <a href="#item_inheritance"><code>inheritance</code></a> key. The
following is a possible .tplinfo file contents:</p>
<pre>
{
inheritance =&gt; '../other'
}</pre>
<p>The above example would indicate that files in this template set can be
inherited from the ../other path, relative to the current template set
directory. The inheritance directory may also contain a full path.</p>
<p>
</p>
<h2><a name="inheriting_from_multiple_locations">Inheriting from multiple locations</a></h2>
<p>You may also inherit from multiple locations by using an array reference for
the inheritance value:</p>
<pre>
{
inheritance =&gt; ['../other', '/full/path/to/a/third']
}</pre>
<p>With the above .tplinfo file, files would be checked for in the current path,
then <code>../other</code>, then any of <code>../other</code>'s inherited directories, then in
<code>third</code>, then in any of <code>third</code>'s inherited directories.</p>
<p>Also keep in mind that ``local'' directories, if they exist, will be checked for
the file before each of their respective directories.</p>
<p>Assuming that the initial template path was <code>/full/path/one</code>, and assuming
that <code>../other</code> inherited from <code>../other2</code>, the directories checked would be
as follows:</p>
<pre>
/full/path/one/local
/full/path/one
/full/path/one/../other/local # i.e. /full/path/other/local
/full/path/one/../other # i.e. /full/path/other
/full/path/one/../other/../other2/local # i.e. /full/path/other2/local
/full/path/one/../other/../other2 # i.e. /full/path/other2
/full/path/to/a/third/local
/full/path/to/a/third</pre>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>All methods in GT::Template::Inheritance are class methods. Each method takes
a hash of options as an argument.</p>
<p>
</p>
<h2><a name="get_path">get_path</a></h2>
<p>
</p>
<h2><a name="get_all_paths">get_all_paths</a></h2>
<p>These methods are used to obtain the location of the file GT::Template will
use, taking into account all inherited and ``local'' template directories. The
get_path option will return the path to the file that will be included, while
the get_all_paths option returns the path to <strong>all</strong> copies of the file found in
the local/inheritance tree. Both methods take a hash containing the following:</p>
<dl>
<dt><strong><a name="item_file">file</a></strong><br />
</dt>
<dd>
The name of the file desired.
</dd>
<p></p>
<dt><strong><a name="item_path">path</a></strong><br />
</dt>
<dd>
The template directory at which to start looking for the above file. Depending
on the existance of ``local'' directories and template inheritance, more than
just this directory will be checked for the file.
</dd>
<p></p>
<dt><strong><a name="item_local">local</a></strong><br />
</dt>
<dd>
Optional. Can be passed with a false value to override the checking of ``local''
directories for files.
</dd>
<p></p>
<dt><strong><a name="item_inheritance">inheritance</a></strong><br />
</dt>
<dd>
Optional. Can be passed with a false value to override the checking of
inheritance directories for files.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="tree">tree</a></h2>
<p>This method returns a list of directories that would be searched for a given
file, in the order they would be searched. It takes the <a href="#item_path"><code>path</code></a>, <a href="#item_local"><code>local</code></a>, and
<a href="#item_inheritance"><code>inheritance</code></a> options above, but not the <a href="#item_file"><code>file</code></a> option.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template.html">the GT::Template manpage</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2005 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Inheritance.pm,v 1.7 2005/02/09 20:51:27 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Template/Parser.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,364 @@
<!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>GT::Template::Vars - Tied hash for template tags handling</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#interface">INTERFACE</a></li>
<ul>
<li><a href="#accessing_values">Accessing values</a></li>
<li><a href="#setting_values">Setting values</a></li>
<li><a href="#keys__exists">Keys, Exists</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::Template::Vars - Tied hash for template tags handling</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
my $vars = GT::Template-&gt;vars;
print $vars-&gt;{foo};</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module is designed to provide a simple interface to GT::Template tags from
Perl code. Prior to this module, the <code>tags()</code> method of GT::Template returned a
hash reference which could contain all sorts of different values - scalar
references, LVALUE references, GT::Config objects, etc. This new interface
provides a tied hash reference designed to aid in retrieving and setting values
in the same way template variables are retrieved and set from templates.</p>
<p>
</p>
<hr />
<h1><a name="interface">INTERFACE</a></h1>
<p>
</p>
<h2><a name="accessing_values">Accessing values</a></h2>
<p>Accessing a value is simple - just access <code>$vars-&gt;{name}</code>. The regular
rules of escaping apply here: if the value would have been HTML-escaped in the
template, it will be escaped when you get it.</p>
<p>
</p>
<h2><a name="setting_values">Setting values</a></h2>
<p>Setting a value is easy - simply do: <code>$vars-&gt;{name} = $value;</code>. ``name''
can be anything GT::Template recognises as a variable, so
<code>$vars-&gt;{'name.key'}</code> would set <code>-&gt;{name}-&gt;{key}</code> (see
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Tutorial.html#advanced_variables_using_references">Advanced variables using references in the GT::Template::Tutorial manpage</a> for more
information on complex variables).</p>
<p>The regular rules of escaping apply here: if escaping is turned on, a value you
set will be escaped when accessed again via $vars or in a template. If you
want to set a tag containing raw HTML, you should set a scalar reference, such
as: <code>$vars-&gt;{name} = \$value;</code>.</p>
<p>
</p>
<h2><a name="keys__exists">Keys, Exists</a></h2>
<p>You can use <code>keys %$vars</code> to get a list of keys of the tag object, but you
should note that while <code>$vars-&gt;{&quot;a.b&quot;}</code> is valid and
<code>exists $vars-&gt;{&quot;a.b&quot;}</code> may return true, it will <strong>not</strong> be present in the
list of keys returned by <code>keys %$vars</code>.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template.html">the GT::Template manpage</a></p>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/Template/Tutorial.html">the GT::Template::Tutorial manpage</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2005 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Vars.pm,v 1.3 2005/03/05 01:17:20 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,272 @@
<!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>/tmp/glist/private/lib/GT/Text/Tools.pm</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<!-- INDEX END -->
</body>
</html>

View File

@ -0,0 +1,723 @@
<!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>GT::WWW - Multi-protocol retrieving and posting, related in functionality to
LWP.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#new">new</a></li>
<li><a href="#head">head</a></li>
<li><a href="#get">get</a></li>
<li><a href="#post">post</a></li>
<li><a href="#url">url</a></li>
<li><a href="#parse_url">parse_url</a></li>
<li><a href="#protocol">protocol</a></li>
<li><a href="#protocol_supported">protocol_supported</a></li>
<li><a href="#valid_host">valid_host</a></li>
<li><a href="#host">host</a></li>
<li><a href="#port">port</a></li>
<li><a href="#reset_port">reset_port</a></li>
<li><a href="#username">username</a></li>
<li><a href="#reset_username">reset_username</a></li>
<li><a href="#password">password</a></li>
<li><a href="#reset_password">reset_password</a></li>
<li><a href="#connection_timeout">connection_timeout</a></li>
<li><a href="#path">path</a></li>
<li><a href="#parameters">parameters</a></li>
<li><a href="#reset_parameters">reset_parameters</a></li>
<li><a href="#query_string">query_string</a></li>
<li><a href="#strict">strict</a></li>
<li><a href="#post_data">post_data</a></li>
<li><a href="#agent">agent</a></li>
<li><a href="#default_agent">default_agent</a></li>
<li><a href="#chunk">chunk</a></li>
<li><a href="#chunk_size">chunk_size</a></li>
<li><a href="#cancel">cancel</a></li>
<li><a href="#cancelled">cancelled</a></li>
<li><a href="#debug_level">debug_level</a></li>
<li><a href="#error">error</a></li>
<li><a href="#fatal_errors">fatal_errors</a></li>
<li><a href="#file">file</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::WWW - Multi-protocol retrieving and posting, related in functionality to
LWP.</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::WWW is designed to provide a common interface for multiple protocols (as of
this writing, only HTTP and HTTPS, however others are planned) and handles
HEAD, GET, and POST requests. For non-HTTP-based protocols, what, exactly, a
``HEAD'', ``GET'', or ``POST'' request is depends on the module in question. For
example, with FTP ``GET'' might download a file, while ``POST'' might upload one to
the server, and ``HEAD'' might return just the size of the file.</p>
<p>The modules under GT::WWW <strong>should not</strong> be used directly; this module should be
used instead. The documentation here describes the options common to all
protocols - however you should check the POD of the protocol subclasses
(GT::WWW::http, GT::WWW::https, etc.) to see any extra options or methods that
those modules provide.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>Quick way:</p>
<pre>
use GT::WWW;
my $www = GT::WWW-&gt;get(&quot;<a href="http://server.com/page&quot">http://server.com/page&quot</a>;);
... = GT::WWW-&gt;post(&quot;<a href="http://server.com/page&quot">http://server.com/page&quot</a>;);
... = GT::WWW-&gt;head(&quot;<a href="http://server.com/page&quot">http://server.com/page&quot</a>;);
... = GT::WWW-&gt;...(&quot;<a href="http://user:pass@server.com/page&quot">http://user:pass@server.com/page&quot</a>;);
... = GT::WWW-&gt;...(&quot;https://server.com/page&quot;);</pre>
<pre>
# This query string will be parsed and passed as POST input:
... = GT::WWW-&gt;post(&quot;<a href="http://server.com/page?foo=bar;bar=foo&quot">http://server.com/page?foo=bar;bar=foo&quot</a>;);</pre>
<p>Longer, but more capable way:</p>
<pre>
use GT::WWW;
my $request = GT::WWW-&gt;new();</pre>
<pre>
$request-&gt;protocol(&quot;http&quot;);
$request-&gt;host(&quot;server.com&quot;);
$request-&gt;port(8080);
$request-&gt;path(&quot;/path/foo.cgi&quot;);
$request-&gt;username(&quot;user&quot;);
$request-&gt;password(&quot;pass&quot;);
$request-&gt;parameters(foo =&gt; &quot;bar&quot;, bar =&gt; &quot;foo&quot;);</pre>
<p>equivelant to the above, using -&gt;url():</p>
<pre>
$request-&gt;url(&quot;<a href="http://user:pass@server.com:8080/path/foo.cgi?foo=bar;bar=foo&quot">http://user:pass@server.com:8080/path/foo.cgi?foo=bar;bar=foo&quot</a>;);</pre>
<p>Now call $request-&gt;get(), $request-&gt;post(), or $request-&gt;head().</p>
<p>Very quick way to print a page:</p>
<pre>
perl -MGT::WWW=get -e 'print get(&quot;<a href="http://server.com/page?foo=bar&amp;bar=foo&quot">http://server.com/page?foo=bar&amp;bar=foo&quot</a>;)'</pre>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>Note that all methods that set values (such as host(), port(), etc.) also
return the value when called without any argument.</p>
<p>
</p>
<h2><a name="new">new</a></h2>
<p>Call <code>new()</code> to get a new GT::WWW object. You can call it without arguments to
get a generic GT::WWW object, or use arguments as described below.</p>
<dl>
<dt><strong><a name="item_url">URL</a></strong><br />
</dt>
<dd>
You can call new with a single scalar argument - a URL to be parsed. The URL is
of the same format as taken by the <code>url()</code> method.
</dd>
<p></p>
<dt><strong><a name="item_hash">HASH</a></strong><br />
</dt>
<dd>
You can alternatively call <code>new()</code> with a hash (or hash reference) of options.
Each of the methods described below can be passed in to new in the form of
<code>key =&gt; value</code> pairs - the methods will be called with the values
specified automatically.
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="head">head</a></h2>
<p>
</p>
<h2><a name="get">get</a></h2>
<p>
</p>
<h2><a name="post">post</a></h2>
<p>These are the methods used to tell the module to actually connect to the server
and download the requested page.</p>
<p>When used as GT::WWW class methods or function calls (but <strong>NOT</strong> as methods on
GT::WWW objects or sub-objects), they take a single URL as an argument. This
call creates an internal GT::WWW object, turns on
<a href="#fatal_errors"><code>fatal_errors(1)</code></a>, passes the URL to <a href="#url"><code>url()</code></a>, then
calls the appropriate <code>get()</code>, <code>head()</code>, or <code>post()</code> method of the resulting
protocol-specific object.</p>
<p>Note, however, that once you have specified a protocol (either via
<a href="#protocol"><code>protocol()</code></a>, or as part of a url passed to <a href="#url"><code>url()</code></a>)
your object ceases to be a GT::WWW object and becomes a protocol-specific
GT::WWW subclass. All subclasses provide their own versions of these methods.</p>
<p>The subclassed methods are not described here because they may not be supported
for all protocols, and their return <code>value(s)</code> may differ from one protocol to
the next. For more details, see the modules listed in the
<a href="#see_also">SEE ALSO</a> section.</p>
<p>Generally, <code>get()</code> and <code>post()</code> return an overloaded object that can be used as a
string to get the content (i.e. for printing), but see the notes in the CAVEATS
section of <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Response.html">the GT::WWW::http::Response manpage</a> for anything more complicated than
concatenation or printing.</p>
<p>
</p>
<h2><a name="url">url</a></h2>
<p>Takes a URL as argument. The URL is parsed into several fields: <code>protocol</code>,
<code>username</code>, <code>password</code>, <code>host</code>, <code>port</code>, <code>path</code>, and <code>query_string</code>, then
each of those properties are set for the current object. Also note that
calling <code>url()</code> on an existing object resets the host, port, username, password,
and all parameters.</p>
<p>Interally, this method calls <a href="#parse_url"><code>parse_url()</code></a>.</p>
<p>
</p>
<h2><a name="parse_url">parse_url</a></h2>
<p>Takes a URI, and returns the following 7 element list:</p>
<pre>
# 0 1 2 3 4 5 6
($protocol, $username, $password, $host, $port, $path, $query_string) =
GT::WWW-&gt;parse_url($url);</pre>
<p>URL's require, at a minimum, protocol and host, in URI form:</p>
<pre>
PROTOCOL://HOST</pre>
<p>The URL can extend up to:</p>
<pre>
PROTOCOL://USERNAME:PASSWORD@HOST:PORT/PATH?QUERY_STRING</pre>
<p>Only protocols known to GT::WWW are acceptable. To check if a URL is valid,
check <code>$protocol</code>.</p>
<p>This method can be called as a class or object method, but not as a function.
If called as an object method, the strict option as currently set for the
object will be used; as a class method or function, an optional second
parameter can be passed in - if true, strict query string parsing mode will be
enabled.</p>
<p>
</p>
<h2><a name="protocol">protocol</a></h2>
<p>Takes a protocol, such as 'http', 'https', 'ftp', etc. Note that when you call
protocol, you object ceases being a GT::WWW object, by becoming a GT::WWW subclass
(such as GT::WWW::http, GT::WWW::https, etc.). Before trying an unknown protocol,
you should generally call the <a href="#protocol_supported">protocol_supported</a> method - calling
<code>protocol(...)</code> with an unsupported protocol will result in a fatal error.</p>
<p>
</p>
<h2><a name="protocol_supported">protocol_supported</a></h2>
<p>This method takes a protocol, such as 'http', 'https', 'ftp', etc. In order to
make sure the protocol is supported, this checks to see that it is an
internally supported protocol, and also tries to load the module to make sure
that the module can be loaded.</p>
<p>
</p>
<h2><a name="valid_host">valid_host</a></h2>
<p>Returns true in scalar context if the host appears valid, or the host and port
in list context if the host is valid. Note that no check is performed to see
whether or not the host resolves or is reachable - this simply verifies that
the host is at least valid enough to warrant a lookup.</p>
<p>
</p>
<h2><a name="host">host</a></h2>
<p>Sets the host, and optionally the port (assuming the argument is of the form:
'hostname:port'). Returns a fatal error if the host is not valid. Note that
setting the host will <strong>reset</strong> the port to the protocol's default value, so
this method <strong>must</strong> be called before port().</p>
<p>
</p>
<h2><a name="port">port</a></h2>
<p>Sets the port for the connection. This can be a name, such as ``smtp'', or a
numeric value. Note that the port value <strong>will be reset</strong> when the <code>host()</code>
method is called, so setting a port <strong>must</strong> happen after setting the host.</p>
<p>
</p>
<h2><a name="reset_port">reset_port</a></h2>
<p>Resets the port so that the next request will use the default port.</p>
<p>
</p>
<h2><a name="username">username</a></h2>
<p>Sets or retrieves the login username.</p>
<p>
</p>
<h2><a name="reset_username">reset_username</a></h2>
<p>Removes the login username.</p>
<p>
</p>
<h2><a name="password">password</a></h2>
<p>Sets the login password.</p>
<p>
</p>
<h2><a name="reset_password">reset_password</a></h2>
<p>Removes the login password.</p>
<p>
</p>
<h2><a name="connection_timeout">connection_timeout</a></h2>
<p>Specifies a timeout for connections, in seconds. By default, a value of 10 is
used. If you specify a false value here, the connection time out will be
system dependent; typically this is from one to several minutes. Note,
however, that the timeout is not supported on Windows systems and so should not
be depended on in code that runs on Windows systems.</p>
<p>
</p>
<h2><a name="path">path</a></h2>
<p>Sets the path for the request. Any HTTP escapes (e.g. %20) are automatically
converted to the actual value (e.g. `` ''). If required, the path will be
automatically re-escaped before being sent to the server.</p>
<p>
</p>
<h2><a name="parameters">parameters</a></h2>
<p>Takes a list (not a hash, since duplicate keys are permitted) of key =&gt; value
pairs. Optionally takes an extra argument - if true, the parameters are added,
not replaced - if omitted (or false), any existing parameters are deleted.</p>
<p>To specify a valueless parameter without a value, such as b in this example
query string:</p>
<pre>
a=1&amp;b&amp;c=3</pre>
<p>Pass undef as b's value. Passing ``'' as the value will result in:</p>
<pre>
a=1&amp;b=&amp;c=3</pre>
<p>For example, to set to two query strings above would require the following two
sets of arguments, respectively:</p>
<pre>
$www-&gt;parameters(a =&gt; 1, b =&gt; undef, c =&gt; 3);</pre>
<pre>
$www-&gt;parameters(a =&gt; 1, b =&gt; &quot;&quot;, c =&gt; 3);</pre>
<p>To then add a ``d=4'' parameter to either one, you would call:</p>
<pre>
$www-&gt;parameters(d =&gt; 4, 1);</pre>
<p>Omitting the extra ``1'' would cause you to erase the previously set parameters.</p>
<p>Values specified should <strong>not</strong> be URL encoded.</p>
<p>If called without arguments, the list of key/value pairs is returned.</p>
<p>
</p>
<h2><a name="reset_parameters">reset_parameters</a></h2>
<p>Resets the parameters. You want to make sure you do this between each request
on the same object, unless using <a href="#url"><code>url()</code></a>, which calls this for you.</p>
<p>
</p>
<h2><a name="query_string">query_string</a></h2>
<p>This function serves the same purpose as <a href="#parameters"><code>parameters()</code></a>, except
that it takes a query string as input instead of a list. Like <code>parameters()</code>,
the default behaviour is to replace any existing parameters unless a second,
true argument is provided.</p>
<p>Note that if you already have your parameters in some sort of list, it is
preferable to pass them to <code>parameters()</code> than to join them into a query
string and pass them into this function, because this function just splits them
back up into a list again.</p>
<p>You can also provide a query string (along with a host, path, and possibly
other data) using the <a href="#url"><code>url()</code></a> method.</p>
<p>If called without arguments, the current parameters will be joined into a valid
query string and returned.</p>
<p>
</p>
<h2><a name="strict">strict</a></h2>
<p>This function is used to tell the GT::WWW object to allow/disallow
standard-violating responses. This has a global effect of allowing query
strings to contain _any_ characters except for ``\r'', ``\n'', and ``#'' - normally,
characters such as /, ?, and various extended characters much be escaped into
%XX format. The <code>strict</code> option may have other protocol-specific effects,
which will be indicated in each protocol's documentation.</p>
<p>The option defaults to non-strict.</p>
<p>
</p>
<h2><a name="post_data">post_data</a></h2>
<p>This function allows you to pass in raw data to be posted. The data will not be
encoded. If you pass in a code reference, the data will be posted in chunks.</p>
<p>
</p>
<h2><a name="agent">agent</a></h2>
<p>Used to set or retrieve the User-Agent string that will be sent to the server.
If the agent string you pass starts or ends with whitespace or a comma, the
default agent will be added at the beginning of end of the User-Agent string,
respectively. This value is only meaningful to protocols supporting something
similar to the HTTP User-Agent.</p>
<p>
</p>
<h2><a name="default_agent">default_agent</a></h2>
<p>Returns the default user agent string. This will be automatically used if no
agent has been set, or if an agent ending with whitespace is specified. This
value is dependent on the protocol being used, but is typically something like
``GT::WWW::http/1.23''. This method is read-only.</p>
<p>
</p>
<h2><a name="chunk">chunk</a></h2>
<p>
</p>
<h2><a name="chunk_size">chunk_size</a></h2>
<p><code>chunk</code> and <code>chunk_size</code> are used to perform a large download in chunks. The
<code>chunk()</code> method takes a code reference that will be called when a chunk of
data has been retrieved from the server, or a value of <code>undef</code> to clear any
currently set chunk code. <code>chunk_size()</code> takes a integer containing the
number bytes that you wish to retrieve at a time from the server; the <code>chunk</code>
code reference will be called with a scalar reference containing up to
<code>chunk_size</code> bytes.</p>
<p>Note that when using chunked downloading, the data will not be available using
the normal content retrieval interface.</p>
<p>Also note that, as of 1.024, the chunk code reference only applies to the next
<code>get()</code> or <code>post()</code> request - after each <code>get()</code> or <code>post()</code> request, the chunk_code is
cleared (in order to avoid self-references and possible memory leaks).</p>
<p>
</p>
<h2><a name="cancel">cancel</a></h2>
<p>
</p>
<h2><a name="cancelled">cancelled</a></h2>
<p>The <code>cancel</code> method can be used in conjunction with the <a href="#chunk"><code>chunk</code></a>
option to abort a download in progress. The chunk code will not be called
again, and the server connection will be closed. This should be used sparingly
and with care. <code>cancelled</code> simply return a true/false value indicating
whether the operation has been cancelled. This value is reset at the beginning
of each operation.</p>
<p>Note that cancelling an operation is never performed automatically, and only
happens - if ever - in the <code>chunk</code> code reference, so checking the
cancellation status is rarely needed.</p>
<p>
</p>
<h2><a name="debug_level">debug_level</a></h2>
<p>This is used to set or retrieve the debug level.
0 = no debugging
1 = debugging related to current operation
2 = adds operation details to debugging level 1
3 = adds data debugging (very large!) to debugging level 2</p>
<p>When passed as part of a hash to new(), the key for this option can be specified
as <code>debug</code> instead of <code>debug_level</code>.</p>
<p>
</p>
<h2><a name="error">error</a></h2>
<p>This method will return a string containing an error that has occured. Note
that an error may be generated even for methods that _seem_ to be correct - for
example, if a server unexpectedly closes the connection before properly
finishing the transfer, a successful return will result since the transfer was
partially successful, but an error message will still be set.</p>
<p>
</p>
<h2><a name="fatal_errors">fatal_errors</a></h2>
<p>This method will alter the current object's error handling behaviour such that
any errors that occur will be propogated to fatal errors. It is enabled
automatically when using the quick (i.e. objectless) forms of <code>get()</code>,
<code>head()</code>, and <code>post()</code> methods which have no associated object on which
-&gt;error can be called.</p>
<p>
</p>
<h2><a name="file">file</a></h2>
<p>This method is used to create a parameter for uploading a file. It takes
either one or two arguments:</p>
<p>2 argument form:
First argument is a <strong>remote</strong> filename, second argument is either a <strong>local</strong>
filename, or a GLOB reference to an open filehandle.</p>
<p>1 argument form:
Argument is a filename to read.</p>
<p>Example usage:</p>
<pre>
my $file = $www-&gt;file(&quot;foo.txt&quot;);
$www-&gt;parameters(foobar =&gt; $file, 1);
my $response = $www-&gt;post();</pre>
<p>This will upload the file from disk named ``foo.txt'', using a form parameter
named ``foobar''. This is similar to uploading a file named ``foo.txt'' via the
following HTML element:</p>
<pre>
&lt;input type=&quot;file&quot; name=&quot;foobar&quot;&gt;</pre>
<p>The two argument form with two filenames is used to lie to the server about the
actual name of the file. Using a filehandle as the second argument is for use
when a filename is not available - such as an opened socket, or a file that has
been opened elsewhere in the code.</p>
<p>Examples:</p>
<pre>
my $file = $www-&gt;file(&quot;foo.txt&quot;, &quot;bar.txt&quot;);
my $file2 = $www-&gt;file(&quot;foo2.txt&quot;, \*FH);
$www-&gt;parameters(foobar =&gt; $file, foobar2 =&gt; $file2, 1);
my $response = $www-&gt;post();</pre>
<p>This will upload two files - a file named <em>foo.txt</em> (which is actually read
from the <code>bar.txt</code> file) specified as form parameter <code>foobar</code>, and a second
file, specified as parameter <code>foobar2</code>, whose content is read from the
filehandle <code>FH</code>.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http.html">the GT::WWW::http manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/https.html">the GT::WWW::https manpage</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: WWW.pm,v 1.25 2005/04/08 19:25:31 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,493 @@
<!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>GT::WWW::http - HTTP interface for GT::WWW</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#header">header</a></li>
<li><a href="#http_10">http_10</a></li>
<li><a href="#strict">strict</a></li>
<li><a href="#no_redirect">no_redirect</a></li>
<li><a href="#redirects">redirects</a></li>
<li><a href="#response">response</a></li>
<li><a href="#cancel">cancel</a></li>
</ul>
<li><a href="#return_values">RETURN VALUES</a></li>
<ul>
<li><a href="#status">Status</a></li>
<li><a href="#content">Content</a></li>
<li><a href="#headers">Headers</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::WWW::http - HTTP interface for GT::WWW</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use GT::WWW;
my $www = GT::WWW-&gt;new();
$www-&gt;protocol('http');
# any valid GT::WWW methods here
# ...
my $header = $www-&gt;header;
$header-&gt;header(&quot;Some-Http-Header&quot; =&gt; $value);
$header-&gt;delete_header(&quot;Some-Other-Http-Header&quot;);</pre>
<pre>
my $response = $www-&gt;get() or die &quot;Could not connect to server: &quot; . $www-&gt;error;</pre>
<pre>
my $status = $response-&gt;status;
my $response_code = int $status; # For example, 200, 404, 500, etc.
my $response_str = &quot;$status&quot;; # For example, 'OK', 'Not Found', 'Internal Server Error', etc.</pre>
<pre>
if ($status) {
# This will be true if the status code is a successful one - in other
# words, true for 2xx responses, false for others
print &quot;Response successful. Content:\n$response\n&quot;;
}
else {
die &quot;Request was not successful ($response_code $response_str)\n&quot;;
}</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::WWW::http handles HTTP connections for GT::WWW. It uses some overloading
to assist in the ease of use without sacrificing functionality.</p>
<p>This document does not cover the basics of a GT::WWW object; those are covered
by <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html">the GT::WWW manpage</a>.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>
</p>
<h2><a name="header">header</a></h2>
<p>This method returns the GT::WWW::http::Header object that will be (or has been)
sent to the HTTP server. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html">the GT::WWW::http::Header manpage</a> for information on using
and manipulating a header object.</p>
<p>Note that you can add headers without first getting a header object by simply
specifying the headers as arguments to header(). Normally, you would call:</p>
<pre>
$www-&gt;header-&gt;header('X-Foo' =&gt; 'bar');</pre>
<p>This shortcut allows for:</p>
<pre>
$www-&gt;header('X-Foo' =&gt; 'bar');</pre>
<p>Check <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html">the GT::WWW::http::Header manpage</a> for valid arguments to the <code>header()</code> method.</p>
<p>
</p>
<h2><a name="http_10">http_10</a></h2>
<p>This method can be used <em>before</em> initiating a request on the object to force
HTTP/1.0 communication with the HTTP server. By default HTTP/1.1 connections
are used. Note that HTTP/1.1 is strongly recommended as this module supports
keep-alive connections only when using HTTP/1.1. To force HTTP/1.0
communication, pass a true value to this method, or a false value to use the
default HTTP/1.1 connections. Returns true if HTTP/1.0 connections will be
used.</p>
<p>
</p>
<h2><a name="strict">strict</a></h2>
<p>This works as described in GT::WWW. Specifically, in addition to the loose
query string restrictions, this allows relative URL Location: redirects
(HTTP/1.1 specifically states that Location: redirects MUST be absolute).</p>
<p>
</p>
<h2><a name="no_redirect">no_redirect</a></h2>
<p>This method is used before a request to indicate that automatic, seemless
redirection should <strong>not</strong> take place. By default, when a server responds with
an acceptable, properly-formed 3xx response allowing a redirection, this module
will automatically perform the redirection, unless this option has been
enabled. To enable, call this method with a true value, or to disable, a false
value. Returns true if automatic redirection is enabled.</p>
<p>Note that redirections will only be performed on GET requests.</p>
<p>
</p>
<h2><a name="redirects">redirects</a></h2>
<p>If redirections are enabled (i.e. the no_redirect option has not been turned
on), you can call the <code>redirects()</code> method to get a list of response objects
created while performing redirections. Typically this will be just one, but
more are possible.</p>
<p>
</p>
<h2><a name="response">response</a></h2>
<p>Returns the response object for the last request. When automatic redirection
is enabled, this will be the response object for the final request. The
response object can be used is multiple ways, which are described below, in the
<a href="#return_values">RETURN VALUES</a> section, and in <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Response.html">the GT::WWW::http::Response manpage</a>.</p>
<p>
</p>
<h2><a name="cancel">cancel</a></h2>
<p>This works as described in <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#cancel">cancel in the GT::WWW manpage</a>, with one exception: if cancelling a
request immediately before a redirect takes place, only the current request is
cancelled - the redirect still occurs. Note that cancelling is likely to be a
resource hit in such a case because the connection cannot be reused and a new
one must be established - typically, to the same server.</p>
<p>
</p>
<hr />
<h1><a name="return_values">RETURN VALUES</a></h1>
<p>The return values of the <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#get"><code>get()</code></a>, <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#head"><code>head()</code></a>,
and <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#post"><code>post()</code></a> methods are simply the response object for the
request, which can also be obtained by calling the <a href="#response"><code>response()</code></a>
method after completing the request.</p>
<p>The full documentation for the response object is covered in
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Response.html">the GT::WWW::http::Response manpage</a>, however the below description is provided for a
brief overview. The following examples assume that ``<code>$response</code>'' is an object
that has been obtained by calling get(), head(), post(), or response().</p>
<p>
</p>
<h2><a name="status">Status</a></h2>
<p>The status of the request is available via the -&gt;status method of the response
object. It is made up of three pieces of data - status code, status string,
and success.</p>
<p>To get the status code (e.g. 500, 200, etc.), simply use the status as a number:</p>
<pre>
my $status = int($response-&gt;status);</pre>
<p>To get the status string (e.g. ``500 Internal Server Error'', ``200 OK''), use the
status as a string:</p>
<pre>
my $status = &quot;&quot; . $response-&gt;status;</pre>
<p>And finally, to get the success of the request, simply use status in boolean
context:</p>
<pre>
if ($response-&gt;status) {</pre>
<p>Success for HTTP is defined by any 200-level response status code. A request
that returns ``200 OK'' will be pass the above if statement, while a request that
returned ``500 Internal Server Error'' will fail.</p>
<p>
</p>
<h2><a name="content">Content</a></h2>
<p>The content of the last request is available by simply using the response
object as a string:</p>
<pre>
my $content = &quot;$response&quot;;</pre>
<p>You should take note, however, that if you are using the
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#chunk"><code>chunk()</code></a> method no content will be available in this way.</p>
<p>Also note that the response object is an object, not a string, so anything
beyond basic string comparison/concatenation should not occur on the response
object itself. See <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Response.html#caveats">CAVEATS in the GT::WWW::http::Response manpage</a> for more details.</p>
<p>
</p>
<h2><a name="headers">Headers</a></h2>
<p>The <code>header()</code> method of the response object returns a GT::WWW::http::Header
object which gives you easy access to the headers returned by the server with
the request.</p>
<p>As a special shortcut, calling <code>header()</code> with arguments will call the
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html#header">header()</a> method of the header object with the
arguments provided. This allows you to optionally change this:</p>
<pre>
my $location = $response-&gt;header-&gt;header('Location');</pre>
<p>into the shorter and clearer:</p>
<pre>
my $location = $response-&gt;header('Location');</pre>
<p>Calling <code>header()</code> without arguments returns the header object for the response.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html">the GT::WWW manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Response.html">the GT::WWW::http::Response manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html">the GT::WWW::http::Header manpage</a>
RFC 2616: <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: http.pm,v 1.31 2005/04/08 19:20:00 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,584 @@
<!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>GT::WWW::http::Header - Module for GT::WWW::http request/response headers.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#header">header</a></li>
<li><a href="#header_words">header_words</a></li>
<li><a href="#split_words">split_words</a></li>
<li><a href="#contains">contains</a></li>
<li><a href="#join_words">join_words</a></li>
<li><a href="#delete_header_word">delete_header_word</a></li>
<li><a href="#delete_header">delete_header</a></li>
<li><a href="#format_headers">format_headers</a></li>
<li><a href="#clear_headers">clear_headers</a></li>
</ul>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::WWW::http::Header - Module for GT::WWW::http request/response headers.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>Typically:</p>
<pre>
# Assuming $www is a GT::WWW::http object
my $request_header = $www-&gt;header;</pre>
<pre>
# Set a header:
$request_header-&gt;header('Some-Http-Header' =&gt; 'Header value');</pre>
<pre>
# After making a request:
my $response_header = $www-&gt;response-&gt;header;
# -- or --
my $response_header = $response-&gt;header; # $response is the return of, e.g. $www-&gt;get</pre>
<p>Much more advanced headers can be set and determined, using the various methods
available as described below.</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This module provides an easy to use yet powerful header retrieval/manipulation
object suitable for most HTTP headers.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>First, a note about the methods described which add/change/delete headers: such
methods should only be called on a request header, and only before making a
request. Although nothing prevents you from making changes to the request
header after having made the request, or from changing the headers of a
response header object, such behaviour should be considered very bad practise
and is <strong>strongly</strong> discouraged.</p>
<p>
</p>
<h2><a name="header">header</a></h2>
<p>This is the most commonly used method as it is used both to add and retrieve
headers, depending on its usage. The examples below assume the following
header:</p>
<pre>
Date: Sun, 12 Jan 2003 08:21:21 GMT
Server: Apache
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 3215
X-Foo: bar1
X-Foo: bar2, bar3</pre>
<p>With no arguments, a list of all the header names is returned. Given the
example, the following list would be returned:</p>
<pre>
('Date', 'Server', 'Keep-Alive', 'Connection', 'Content-Type', 'Content-Encoding', 'Content-Length', 'X-Foo', 'X-Foo')</pre>
<p>With a single argument, a list of <code>value(s)</code> for headers of that name are
returned. In scalar context, only the first value is returned. In list
context, a list of all values is returned. Note that the header named passed
in is case-insensitive.</p>
<pre>
my $server = $header-&gt;header('server'); # returns 'Apache'
my $foo = $header-&gt;header('X-Foo'); # returns 'bar1'
my @foo = $header-&gt;header('x-Foo'); # returns ('bar1', 'bar2, bar3')</pre>
<p>Finally, when more than one argument is provided, header values are set. At
its simplest level, it takes a list of key =&gt; value pairs (NOT a hash, since
duplicate keys are possible) of headers to set. So, to set the headers
'Server' and 'Content-Length' above at once, you could call:</p>
<pre>
$header-&gt;header(Server =&gt; 'Apache', 'Content-Length' =&gt; 3215);</pre>
<p>Or, if you prefer:</p>
<pre>
$header-&gt;header(Server =&gt; 'Apache');
$header-&gt;header('Content-Length' =&gt; 3215);</pre>
<p>Note that the order in which headers are added is preserved, for times when the
order of headers is important.</p>
<p><strong>WARNING</strong>: Before reading the below information, you should first know that it
describes advanced usage of the <code>header()</code> method and requires have a grasp of
the intricacies of HTTP headers; the following is _not_ required knowledge for
typical GT::WWW use.</p>
<p>Consider the above Keep-Alive header an example. Instead of specifying:</p>
<pre>
$header-&gt;header('Keep-Alive' =&gt; 'timeout=15, max=100');</pre>
<p>you could alternately write it as:</p>
<pre>
$header-&gt;header('Keep-Alive' =&gt; [timeout =&gt; 15, max =&gt; 100]);</pre>
<p>This allows you a more pragmatic approach when you already have some sort of
data structure of the header options. You can go a step further with this, by
specifying <code>undef</code> as the value:</p>
<pre>
# Set the second X-Foo header in the example:
$header-&gt;header('X-Foo' =&gt; [bar2 =&gt; undef, bar3 =&gt; undef]);</pre>
<p><code>header()</code> also allows you to set values such as:</p>
<pre>
image/gif;q=0.2</pre>
<p>As can be seen in this example:</p>
<pre>
Accept: image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1</pre>
<p>To do so, specify the suboption value as another array reference. The first
element of the array reference is usually undef, while the remaining are the
k=v pairs in the segment. So, in the above header, the 'image/gif;q=0.2' section
would be specified as:</p>
<pre>
'image/gif' =&gt; [undef, q =&gt; 0.2]</pre>
<p>(If a segment such as ``foo=bar;bar=foo'' is ever needed, the <code>undef</code> would be
changed to <code>&quot;bar&quot;</code>.)</p>
<p>So, piecing it all together, the Accept header shown above could be specified
like this:</p>
<pre>
$header-&gt;header(
Accept =&gt; [
'image/png' =&gt; undef,
'image/jpeg' =&gt; undef,
'image/gif' =&gt; [undef, q =&gt; 0.2],
'*/*' =&gt; [undef, q =&gt; 0.1]
]
);</pre>
<p>
</p>
<h2><a name="header_words">header_words</a></h2>
<p>When you need to see it a header value contains a particular ``word'', this
method is the one to use. As an example, consider this header:</p>
<pre>
X-Foo: bar, bar2, bar3</pre>
<p>In order to determine whether or not ``bar2'' has been specified as an X-Foo
value, you could attempt some sort of regex - or you could just call this
method. The return value splits up the header in such a way as to be useful to
determine the exact information contained within the header.</p>
<p>The method takes a case-insensitive header name, just like the single-argument
form of header().</p>
<p>A even-numbered hash-<em>like</em> list is always returned - though each element of
that list depends on the content of the header. First of all, if the header
specified does not exist, you'll get an empty list back.</p>
<p>Assuming that the header does exist, it will first be broken up by <code>,</code>.</p>
<p>The even-indexed (0, 2, 4, ...) elements of the list are the keys, while the
odd numbered elements are the values associated with those keys - or undef if
there is no value (as above; an example with values is shown below).</p>
<p>So, using the above X-Foo header example, calling this method with <code>'X-Foo'</code>
as an argument would give you back the list:</p>
<pre>
(bar =&gt; undef, bar2 =&gt; undef, bar3 =&gt; undef)</pre>
<p>Getting a little more complicated, consider the following header:</p>
<pre>
X-Foo: bar, bar2=foo, bar3</pre>
<p>Because of the ``=foo'' part, the list returned would now be:</p>
<pre>
(bar =&gt; undef, bar2 =&gt; &quot;foo&quot;, bar3 =&gt; undef)</pre>
<p>Quoting of values is also permitted, so the following would be parsed correctly
with <code>'1;2,3=4&quot;5\6'</code> being the value of bar2:</p>
<pre>
X-Foo: bar, bar2=&quot;1;2,3=4\&quot;5\\6&quot;, bar3</pre>
<p>Getting more complicated, this method also handles complex values containing
more than one piece of information. A good example of this is in content type
weighting used by most browsers. As a real life example (generated by
the Phoenix web browser):</p>
<pre>
Accept: video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1</pre>
<p>Working that into the X-Foo example, consider this header:</p>
<pre>
X-Foo: bar, bar2=foo, bar3;foo1=24;foo2=10</pre>
<p>In this case, the value for bar3 will become an array reference to handle the
multiple pieces of information in the third part:</p>
<pre>
(bar =&gt; undef, bar2 =&gt; &quot;foo&quot;, bar3 =&gt; [undef, foo1 =&gt; 24, foo2 =&gt; 10])</pre>
<p>(If you've read the advanced section of the <a href="#header"><code>header()</code></a>
documentation, and this looks familiar, you're right - the return value of this
function, if put in an array reference, is completely compatible with a
<code>header()</code> value.)</p>
<p>The <code>undef</code> value at the beginning of the array reference is rarely anything other
than <code>undef</code>, but it <em>could</em> be, if a header such as this were encountered:</p>
<pre>
X-Foo: bar=foo,foo1=10</pre>
<p>That would return:</p>
<pre>
(bar =&gt; [&quot;foo&quot;, foo1 =&gt; 10])</pre>
<p>One additional thing to note is that <code>header_words()</code> returns the header words
for <strong>all</strong> matching headers. Thus if the following two headers were set:</p>
<pre>
X-Foo: bar, bar2=foo
X-Foo: bar3</pre>
<p>You would get the same return as if this header was set (shown above):</p>
<pre>
X-Foo: bar, bar2=foo, bar3</pre>
<p>A good example usage of this is for a file download. To get the filename, you
would do something like:</p>
<pre>
my %cd = $header-&gt;header_words('Content-Disposition');
my $filename;
if ($cd{filename}) { $filename = $cd{filename} }
else { $filename = &quot;unknown&quot; }</pre>
<p>
</p>
<h2><a name="split_words">split_words</a></h2>
<p>This can be called as object method, class method, or function - it takes a
single argument, a string, which it proceeds to split up as described for the
above <code>header_words()</code> method. Note that this knows nothing about header names -
it simply knows how to break a header value into the above format.</p>
<p>This method is used internally by header_words(), but can be used separately if
desired.</p>
<p>
</p>
<h2><a name="contains">contains</a></h2>
<p>This method takes two arguments: a header, and a header word. It returns true
if the header word passed is found in the header specified. For example, the
following would return true:</p>
<pre>
$header-&gt;contains('X-Foo' =&gt; 'bar2')</pre>
<p>for any of these headers:</p>
<pre>
X-Foo: bar2
X-Foo: bar, bar2, bar3
X-Foo: bar, bar2=10, bar3
X-Foo: bar, bar2=10;q=0.3, bar3</pre>
<p>but not for either of these:</p>
<pre>
X-Foo: bar, bar3=bar2
X-Foo: bar, bar3;bar2=10</pre>
<p>
</p>
<h2><a name="join_words">join_words</a></h2>
<p><code>join_words()</code> does the opposite of split_words(). That is, it takes a value such
as might be returned by split_words(), and joins it up properly, quoting if
necessary. This is called internally when creating the actual header, and can
be called separately at a method or function if desired.</p>
<p>
</p>
<h2><a name="delete_header_word">delete_header_word</a></h2>
<p>This takes a header and header word, and proceeds to remove any occurances of
the header word from the header specified.</p>
<p>After calling:</p>
<pre>
$header-&gt;delete_header_word('X-Foo', 'bar2');</pre>
<p>this header:</p>
<pre>
X-Foo: bar, bar2;foo=bar, bar3</pre>
<p>would become:</p>
<pre>
X-Foo: bar, bar3</pre>
<p>
</p>
<h2><a name="delete_header">delete_header</a></h2>
<p>This takes a list of header names. The headers specified are completely
removed.
</p>
<pre>
=head2 replace_header</pre>
<p>This 2 or more arguments in exactly the same way as header(), however all the
specified headers are deleted (assuming they exist) before being readded.</p>
<p>
</p>
<h2><a name="format_headers">format_headers</a></h2>
<p>This returns a properly formatted (lines are CRLF delimited) header. If you
use the header as a string (i.e. <code>&quot;$header&quot;</code>), this method will be internally
called, and so generally does not need to be called directly.</p>
<p>The returned string has the final blank line that identifies the end of the
header.</p>
<p>
</p>
<h2><a name="clear_headers">clear_headers</a></h2>
<p>This deletes all headers.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http.html">the GT::WWW::http manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html">the GT::WWW manpage</a>
RFC 2616: <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Header.pm,v 1.8 2004/02/17 01:33:08 jagerman Exp $</p>
</body>
</html>

View File

@ -0,0 +1,478 @@
<!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>GT::WWW::http::Response::Status - Overloaded
response objects for HTTP request data.</title>
<link rev="made" href="mailto:root@penguin.office.gossamer-threads.com" />
<style type="text/css">
/* $MVD$:fontset("Untitled Font Set 1","ARIEL","HELVETICA","HELV","SANSERIF") */
/* $MVD$:fontset("Arial","Arial") */
/* $MVD$:fontset("Arial Black","Arial Black") */
/* $MVD$:fontset("Algerian","Algerian") */
body {
background-color: white;
font-family: Verdana, Arial, sans-serif;
font-size: small;
color: black;
}
p {
background-color : white;
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
h1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
background-color : white;
color : maroon;
}
h2 {
font-family : Verdana, Arial, sans-serif;
font-size : medium;
font-weight : bold;
color : blue;
background-color : white;
}
h3 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : medium;
color : black;
background-color : white;
}
h4 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : maroon;
background-color : white;
}
h5 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : blue;
background-color : white;
}
h6 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : small;
color : black;
background-color : white;
}
ul {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
ol {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
li {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
th {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
td {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dl {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dd {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
dt {
font-family : Verdana, Arial, sans-serif;
font-size : small;
color : black;
}
code {
font-family : Courier;
font-size : small;
color : black;
}
pre {
font-family : Courier;
font-size : small;
color : black;
}
.mvd-H1 {
font-family : Verdana, Arial, sans-serif;
font-weight : bold;
font-size : 14.0pt;
background-color : transparent;
background-image : none;
color : maroon;
}
.mvd-H2 {
font-family : Verdana, Arial, sans-serif;
font-size : 12.0pt;
color : blue;
}
p.indent {
font-family : "Verdana, Arial, sans-serif";
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
.mvd-P-indent {
font-family : Verdana, Arial, sans-serif;
list-style-type : circle;
list-style-position : inside;
color : black;
margin-left : 16.0pt;
}
pre.programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE-programlisting {
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
.mvd-PRE {
font-size : 9.0pt;
}
p.note {
margin-left : 28.0pt;
}
.mvd-P-note {
margin-left : 28.0pt;
}
.mvd-H4 {
font-family : Verdana, Arial, sans-serif;
font-weight : normal;
font-size : 9.0pt;
color : black;
margin-left : 6.0pt;
margin-top : -14.0pt;
}
.mvd-P {
font-family : Verdana, Arial, sans-serif;
font-size : 10.0pt;
color : black;
}
.mvd-BODY {
font-family : Verdana, Arial, sans-serif;
background-color : white;
}
p.indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
.mvd-P-indentnobullet {
font-family : Verdana, Arial, sans-serif;
list-style-type : none;
}
</style>
</head>
<body style="background-color: white">
<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>
<li><a href="#content">CONTENT</a></li>
<li><a href="#methods">METHODS</a></li>
<ul>
<li><a href="#content">content</a></li>
<li><a href="#status">status</a></li>
<li><a href="#header">header</a></li>
</ul>
<li><a href="#caveats">CAVEATS</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#maintainer">MAINTAINER</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#version">VERSION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>GT::WWW::http::Response and GT::WWW::http::Response::Status - Overloaded
response objects for HTTP request data.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
# ($www is continued from GT::WWW::http SYNOPSIS)</pre>
<pre>
my $response = $www-&gt;get(); # or post(), or head()
# -- or, after having called get(), post() or head(): --
my $response = $www-&gt;response();</pre>
<pre>
my $status = $response-&gt;status();</pre>
<pre>
my $content = &quot;$response&quot;;
my $response_code = int($status); # i.e. 200, 404, 500
my $response_str = &quot;$status&quot;; # i.e. 'OK', 'Not Found', 'Internal Server Error'
if ($status) { # True for 2xx requests, false otherwise (e.g. 404, 500, etc.)
...
}</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>GT::WWW::http::Response objects are returned by the <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#get"><code>get()</code></a>,
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#post"><code>post()</code></a>, and <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#head"><code>head()</code></a> methods of GT::WWW
HTTP requests (and derivatives - i.e. HTTPS), or by calling
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http.html#response"><code>response()</code></a> after having made such a request. The
objects are overloaded in order to provide a simple interface to the response,
while still having all the information available.</p>
<p>A response object always returns true in boolean context, allowing you to do
things like <code>$www-&gt;get($url) or die;</code> - even when a page is empty, or
contains just '0'.</p>
<p>
</p>
<hr />
<h1><a name="content">CONTENT</a></h1>
<p>In addition to the methods described below, the way to simply access the data
returned by the server is to simply use it like a string - for example,
printing it, concatenating it with another string, or quoting it.</p>
<p>You should, however, take note that when using the <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html#chunk"><code>chunk()</code></a>
option for an HTTP request, the content will not be available.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>For simple requests, often the content alone is enough. The following methods
are used to determine any other information available about the response.</p>
<p>
</p>
<h2><a name="content">content</a></h2>
<p>Returns the content of the HTTP response. Note that this returns the exact
same value as using the object in double quotes.</p>
<p>
</p>
<h2><a name="status">status</a></h2>
<p>Returns the response status object for the request. This object provides three
pieces of information, and has no public methods. Instead, the data is
retrieved based on the context of the object.</p>
<pre>
my $status = $response-&gt;status;</pre>
<p>(N.B. Though the examples below use a <code>$status</code> variable, there is no reason
they couldn't be written to use <code>$response-&gt;status</code> instead.)</p>
<dl>
<dt><strong><a name="item_numeric_status">numeric status</a></strong><br />
</dt>
<dd>
The numeric status of an HTTP request (e.g. 200, 404, 500) is available simply
by using the status object as a number.
</dd>
<dd>
<pre>
my $numeric_status = int $status;</pre>
</dd>
<p></p>
<dt><strong><a name="item_string_status">string status</a></strong><br />
</dt>
<dd>
The string status of an HTTP request (e.g. ``OK'', ``Not Found'', ``Internal Server
Error'') is available by using the status object as a string (e.g. printing it,
or concatenating it with another string).
</dd>
<dd>
<pre>
# Assign the status string to a variable:
my $status_string = &quot;$status&quot;;</pre>
</dd>
<dd>
<pre>
# Print out the status string:
print $status;</pre>
</dd>
<dd>
<pre>
# To get a string such as &quot;500 Internal Server Error&quot;:
my $string = int($status) . &quot; &quot; . $status;</pre>
</dd>
<p></p>
<dt><strong><a name="item_boolean_status">boolean status</a></strong><br />
</dt>
<dd>
In order to quickly determine whether or not a request was successful, you can
use the status object in a boolean context.
</dd>
<dd>
<p>Success is determined by the numeric status of the response. Any 2xx status
(usually 200 OK, but there are others) counts as a successful response, while
any other status counts as a failure.</p>
</dd>
<dd>
<pre>
if ($status) { print &quot;Request successful!&quot; }
else { print &quot;Request failed!&quot; }</pre>
</dd>
<p></p></dl>
<p>
</p>
<h2><a name="header">header</a></h2>
<p>This method, called without arguments, returns the
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html">header</a> object for the response.</p>
<pre>
my $header = $response-&gt;header;</pre>
<p>If this method is called with arguments, those arguments are passed to the
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html#header"><code>header()</code></a> method of the header object. This
allows this useful shortcut:</p>
<pre>
my $some_header_value = $response-&gt;header(&quot;Some-Header&quot;);</pre>
<p>instead of the alternative (which also works):</p>
<pre>
my $some_header_value = $response-&gt;header-&gt;header(&quot;Some-Header&quot;);</pre>
<p>Information on header object usage is contained in <a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html">the GT::WWW::http::Header manpage</a>.</p>
<p>Note that although a header object allows for header manipulation, changing the
headers of a response object should be considered bad practise, and is strongly
discouraged.</p>
<p>
</p>
<hr />
<h1><a name="caveats">CAVEATS</a></h1>
<p>Although the response object _works_ like a string, keep in mind that it is
still an object, and thus a reference. If you intend to pass the data to
another subroutine expecting a string, it is recommended that you force the
content into string form, either by quoting the variable (<code>&quot;$var&quot;</code>) or by
calling the <code>content()</code> method (<code>$var-&gt;content</code>). Not doing so can lead to
unexpected results, particularly in cases where another subroutine may
differentiate between a string and a reference, and not just use the value as a
string.</p>
<p>Also, in terms of speed, obtaining the content (not the object) into another
variable (either via <code>&quot;$var&quot;</code> or <code>$var-&gt;content</code>) can make quite a
substantial difference when several string comparison operations are performed.
The reason is simply that every time the object is used is a string, the
content method is called, which can amount to a significant slowdown.</p>
<p>Although string operations that change the string (i.e. s///) appear to work,
they in fact clobber the reference and turn your variable into an ordinary
string. This should not be done - if the string needs to be modified, take a
copy of it first, and modify the copy.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW.html">the GT::WWW manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http.html">the GT::WWW::http manpage</a>
<a href="glist.cgi?do=admin_gtdoc&topic=/GT/WWW/http/Header.html">the GT::WWW::http::Header manpage</a>
RFC 2616: <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a></p>
<p>
</p>
<hr />
<h1><a name="maintainer">MAINTAINER</a></h1>
<p>Jason Rhinelander</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved.
<a href="http://www.gossamer-threads.com/">http://www.gossamer-threads.com/</a></p>
<p>
</p>
<hr />
<h1><a name="version">VERSION</a></h1>
<p>Revision: $Id: Response.pm,v 1.8 2004/08/04 19:23:07 jagerman Exp $</p>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More