The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.1  (Win32)">
	<META NAME="AUTHOR" CONTENT="Nathan Goodman">
	<META NAME="CREATED" CONTENT="20041204;8294237">
	<META NAME="CHANGEDBY" CONTENT="Nathan Goodman">
	<META NAME="CHANGED" CONTENT="20041225;8503187">
	<STYLE>
	<!--
		@page { size: 8.5in 11in }
		TD P { margin-bottom: 0.08in; font-size: 10pt; line-height: 0.14in }
		H1 { margin-top: 0.22in; margin-bottom: 0.08in }
		H1.western { font-family: "Times New Roman", serif; font-size: 10pt }
		P { margin-bottom: 0.14in; font-size: 10pt; line-height: 0.14in }
		P.code-western { margin-bottom: 0in; font-family: "Courier New", monospace; font-size: 10pt; line-height: 100% }
		P.code-cjk { margin-bottom: 0in; font-size: 10pt; line-height: 100% }
		P.code-ctl { margin-bottom: 0in; font-size: 10pt; line-height: 100% }
		P.row-heading-western { font-size: 10pt; font-weight: bold }
		P.row-heading-cjk { font-size: 10pt }
		P.row-heading-ctl { font-size: 10pt }
		TH P { margin-bottom: 0.08in; font-size: 10pt; line-height: 0.14in }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H1 CLASS="western">NAME</H1>
<P STYLE="margin-bottom: 0.2in">Class::AutoDB::Registration - One
registration for Class::AutoDB::Registry</P>
<H1 CLASS="western">SYNOPSIS</H1>
<P STYLE="margin-bottom: 0.2in">This is a helper class for
Class::AutoDB::Registry which represents one entry in a registry.</P>
<PRE>use Class::AutoDB::Registration;
my $registration=new Class::AutoDB::Registration
  (-class=&gt;'Class::Person',
   -collection=&gt;'Person',
   -keys=&gt;qq(name string, dob integer, significant_other object, 
             friends list(object)),
   -transients=&gt;[qw(age)],
   -auto_gets=&gt;[qw(significant_other)]);

# Set the object's attributes
my $collection=$registration-&gt;collection;
my $class=$registration-&gt;class;
my $keys=$registration-&gt;keys;
my $transients=&gt;$registration-&gt;transients;
my $auto_gets=&gt;$registration-&gt;auto_gets;</PRE><H1 CLASS="western">
DESCRIPTION</H1>
<P STYLE="margin-bottom: 0.2in">This class represents essentially raw
registration information submitted via the 'register' method of
Class::AutoDB::Registry. This class parses the 'keys' parameter, but
does not verify that attribute names and data types are valid. This
class <I>does not talk to the database</I>.</P>
<P STYLE="margin-bottom: 0.2in">The 'keys' parameter consists of
attribute, data type pairs, or can also be an ARRAY ref of attribute
names. In the latter case the data type of each attribute is assumed
to be 'string'.</P>
<a name="bugs_and_wishlist"></a>
<H1 CLASS="western">BUGS and WISH-LIST</H1>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=37*>
	<COL WIDTH=130*>
	<COL WIDTH=89*>
	<THEAD>
		<TR VALIGN=TOP>
			<TH WIDTH=14%>
				<P><FONT SIZE=2>Name</FONT></P>
			</TH>
			<TH WIDTH=51%>
				<P><FONT SIZE=2>Description</FONT></P>
			</TH>
			<TH WIDTH=35%>
				<P><FONT SIZE=2>Priority/When</FONT></P>
			</TH>
		</TR>
	</THEAD>
	<TBODY>
		<TR>
			<TD WIDTH=14%>
				<P CLASS="row-heading-western"><BR>
				</P>
			</TD>
			<TD WIDTH=51%>
				<P><BR>
				</P>
			</TD>
			<TD WIDTH=35%>
				<P><BR>
				</P>
			</TD>
		</TR>
	</TBODY>
</TABLE>
<a name="methods_and_functions"></a>
<H1 CLASS="western">METHODS and FUNCTIONS - Initialization</H1>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=38*>
	<COL WIDTH=61*>
	<COL WIDTH=157*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Title</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P><FONT FACE="Courier New, monospace">new</FONT></P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Usage</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<PRE>my $registration=new Class::AutoDB::Registration
  (-class=&gt;'Person',
   -collection=&gt;'Person',
   -keys=&gt;qq(name string, dob integer, 
             significant_other object,friends list(object)),
   -transients=&gt;[qw(age)],
   -auto_gets=&gt;[qw(significant_other)]);</PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P>Constructor.</P>
		</TD>
	</TR>
	<TR>
		<TD ROWSPAN=6 WIDTH=15%>
			<P CLASS="row-heading-western">Args</P>
		</TD>
		<TD WIDTH=24%>
			<P CLASS="code-western">-class</P>
		</TD>
		<TD WIDTH=61%>
			<P>Name of class being registered</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=24%>
			<P CLASS="code-western">-collection</P>
		</TD>
		<TD WIDTH=61%>
			<P>Name of collection being registered or ARRAY ref of names</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=24%>
			<P CLASS="code-western">-collections</P>
		</TD>
		<TD WIDTH=61%>
			<P>Synonym for -collection</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=24%>
			<P CLASS="code-western">-keys</P>
		</TD>
		<TD WIDTH=61%>
			<P>Search keys for collection.</P>
			<P>Can be string of comma separated attribute and data type pairs,
			or ARRAY ref of attributes in which case the type is assumed to be
			'string'. 
			</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=24%>
			<P CLASS="code-western">-transients</P>
		</TD>
		<TD WIDTH=61%>
			<P>ARRAY ref of attributes that will not be stored.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=24%>
			<P CLASS="code-western">-auto_gets</P>
		</TD>
		<TD WIDTH=61%>
			<P>ARRAY ref of attributes that should be automatically retrieved
			when this object is retrieved.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Returns</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P>Registration object</P>
		</TD>
	</TR>
</TABLE>
<H1 CLASS="western">METHODS and FUNCTIONS &ndash; Simple Attributes</H1>
<P>These are methods for getting and setting the values of simple
attributes. Methods have the same name as the attribute. Some of
these should be read-only (more precisely, should only be written by
code internal to the object), but this is not enforced. 
</P>
<P>To get the value of attribute <FONT FACE="Courier New, monospace">xxx</FONT>,
just say 
</P>
<P STYLE="margin-left: 0.29in"><FONT FACE="Courier New, monospace">$xxx=$object-&gt;xxx;
</FONT>
</P>
<P>To set a scalar attribute, say</P>
<P STYLE="margin-left: 0.29in"><FONT FACE="Courier New, monospace">$object-&gt;xxx($new_value);
</FONT>
</P>
<P>To clear it, say 
</P>
<P STYLE="margin-left: 0.31in"><FONT FACE="Courier New, monospace">$object-&gt;xxx(undef);</FONT></P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=39*>
	<COL WIDTH=217*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Attribute</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<PRE><FONT FACE="Courier New, monospace">class</FONT></PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Name of class being registered</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Access</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<H1 CLASS="western" STYLE="font-weight: medium">Read-write</H1>
		</TD>
	</TR>
</TABLE>
<P><BR><BR>
</P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=39*>
	<COL WIDTH=217*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Attribute</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<PRE><FONT FACE="Courier New, monospace">collection</FONT></PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Name of collection being registered</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Returns</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>In scalar context, the name (if there's just one) or the first
			name (if there are several). In array context, list of names.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Access</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Read-write</P>
		</TD>
	</TR>
</TABLE>
<P><BR><BR>
</P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=39*>
	<COL WIDTH=217*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Attribute</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<PRE><FONT FACE="Courier New, monospace">collections</FONT></PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Synonym for collection with slightly different return types.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Returns</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>In scalar context, ARRAY ref of names. In array context, ARRAY
			of names.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Access</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Read-write</P>
		</TD>
	</TR>
</TABLE>
<P><BR><BR>
</P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=39*>
	<COL WIDTH=217*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Attribute</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<PRE><FONT FACE="Courier New, monospace">transients</FONT></PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Attributes that are not stored.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Returns</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>In scalar context, ARRAY ref of attribute names. In array
			context, ARRAY of attribute names.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Access</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Read-write</P>
		</TD>
	</TR>
</TABLE>
<P><BR><BR>
</P>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=39*>
	<COL WIDTH=217*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Attribute</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<PRE><FONT FACE="Courier New, monospace">auto_gets</FONT></PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Attributes that are automatically retrieved when this object is
			retrieved</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Returns</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>In scalar context, ARRAY ref of attribute names. In array
			context, ARRAY of attribute names.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Access</P>
		</TD>
		<TD WIDTH=85% VALIGN=TOP>
			<P>Read-write</P>
		</TD>
	</TR>
</TABLE>
<H1 CLASS="western">METHODS and FUNCTIONS &ndash; Other</H1>
<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=38*>
	<COL WIDTH=63*>
	<COL WIDTH=155*>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Title</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<PRE>keys</PRE>
		</TD>
	</TR>
	<TR>
		<TD ROWSPAN=4 WIDTH=15%>
			<P CLASS="row-heading-western">Usage</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P CLASS="code-western">my %keys=$table-&gt;keys</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<PRE>my $keys=$table-&gt;keys</PRE>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P CLASS="code-western">my %keys=$table-&gt;keys($keys)</P>
		</TD>
	</TR>
	<TR>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<PRE>my $keys=$table-&gt;keys($keys)</PRE>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Function</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P>Get or set keys registered for this table. Returns HASH or HASH
			ref of <FONT FACE="Courier New, monospace">key=&gt;type</FONT>
			pairs depending on context.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Args</P>
		</TD>
		<TD WIDTH=25%>
			<PRE>$keys</PRE>
		</TD>
		<TD WIDTH=61% VALIGN=TOP>
			<P>Search keys for collection.</P>
			<P>Can be string of comma separated attribute and data type pairs,
			or ARRAY ref of attributes in which case the type is assumed to be
			'string'.</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=15%>
			<P CLASS="row-heading-western">Returns</P>
		</TD>
		<TD COLSPAN=2 WIDTH=85% VALIGN=TOP>
			<P>HASH or HASH ref depending on context</P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-bottom: 0in; line-height: 100%"><BR>
</P>
</BODY>
</HTML>