CGI Documentation for pubrfind.pl

by Walter Ian Kaye

Description

pubrfind.pl is a CGI written in Perl. It searches for SLAC publication or report files (actually, it searches for the document's HTML top-file), based on the document number supplied by the user.

Fields

The form contains the following fields:

Input Type
    Name
    Meaning
Radio button group doctype Type of document to search for.
Text pubnum 4-digit publication number.
Text rptnum 3-digit report number.
(Reset)
(Submit)

A sample form may be found at <http://www.slac.stanford.edu/~boo/searchtest.html>.

The final page is located at <http://www.slac.stanford.edu/pubs/fastfind.html>.

Field Values

Field Name
    Value
doctype "pub" | "rpt"
pubnum 0000-9999 (in Perl: /\d{4}/)
rptnum 000-999 (in Perl: /\d{3}/)

Notes

The pubnum and rptnum text fields are strictly validated by pubrfind.pl as 4-digit (or blank) and 3-digit (or blank) values, respectively; invalid data will be rejected. The number supplied, combined with the specified document type, is used to build a full pathname to the HTML file.
This file's existence is then tested; if found, its URL is returned via a Location: header; otherwise an error page is generated.

wik
1997-11-24