The form generator, formgen.pl, runs as a CGI script. It requires at least one argument, which tells the generator which instance of Docbase to use. For example, the CGI call:
produces the form shown in Figure 6.1.
Figure 6-1. Default ProductAnalysis input form
The assignment date, overridden by the
|assigndate| marker, appears as static
text. All other fields are open for input. However, this CGI call:
produces the form shown in Figure 6.2.
Figure 6-2. Customized ProductAnalysis input form
the generator, using the services of the
Docbase::Input module, has overridden every
replaceable marker with a computed or preassigned value. The analyst
who completes this form needs to fill in only four of the fields:
Full Report, and
The form generator, formgen.pl, appears in Example 6.2. It’s brief, because most of the work is done by two modules: TinyCGI and Docbase::Input.
Example 6-2. The Docbase Form Generator
#!/usr/bin/perl -w use strict; use TinyCGI; # load basic CGI services my $tc = TinyCGI->new(); print $tc->printHeader(); my $vars = $tc->readParse(); ...