<?xml version="1.0"?>
<doc>
<head><title>Employee Personnel Form Interface</title>
    <subtitle>Revision 0.01</subtitle>
    <subtitle><today/></subtitle>
</head>

<p/>The Personnel Budget Database System includes a printable form, the
<i>Employee Personnel Report.</i>  In order to make this form
accessible to perl code while maintaining flexibility, the form will
provide an interface including methods that may be called through an
EPRForm object.  (More specifically, through a reference to such an
object.) 

<p/>By restricting access to these methods, we minimize memory usage,
since the symbols associated with the variables and subroutines of the
form's package will not be copying to the namespace of the code using
the form.

<sectionhead>Methods</sectionhead>

<p/><b>new</b>
<p/>Creates a new form object and returns a reference to it.  
<p/>Accepts an optional hash reference.  The keys of the hash should
be fieldnames, and the values should be the appropriate information
for each field, for example:

<!-- don't try to use tabs for formatting here; use spaces -->
<code>
my $form    = new EPRForm();
</code>

<p/><i>-- or --</i>

<code>
my $form    = new EPRForm({
                           'fname'       => 'Roger',
                           'lname'       => 'Hill',
                           'SSN'         => '259988593',
                           });
</code>

<p/><b>field</b>
<p/>Returns the value of a field, optionally setting the field first.
If you provide two parameters: the fieldname and a value, the form's
will remember that value for that field:

<code>
$form->field("fname", "Peter");
</code>

<p/>If you only provide one parameter, the form's value for that field
will be returned (or undef if there is no value for that field):

<code>
my $fname    = $form->field("fname");
</code>

<p/>Or just use a hash reference to set lots of fields like you can do
in the constructor:

<code>
$form->field({
    "fname"	 => "Austin",
    "lname"	 => "Powers",
    "mname"	 => "Danger"
  });
</code>

<p/><b>generate_pdffile</b>
<p/>Accepts a parameter for the filename to write to.  Returns the whole pdf
document as a string.  This method will die with an appropriate error
message, so you can trap an exception by using eval if you need to:

<code>
my $pdf;
eval $pdf    = $form->generate_pdffile;
warn "there was a problem: $@" if $@;
</code>

<sectionhead>Fieldnames</sectionhead>

Here is a listing of the fields in the form:

<p/><b>fname</b>
<p/><b>lname</b>
<p/><b>mname</b>
<p/><b>fname</b>
<p/><b>fname</b>

</doc>
