Description is a HFPM module that checks indicated fields and environmental variables, seeing if they're filled out. It they're not, reports that fact to the user and terminates the pipeline.

This can be used to make sure the user filled out all the require fields on a form or as a sanity check on fields and environmental variables being present that should be available.

Usage {$fld | fld | %envvar} in the pipeline.

Usage Explanation

The indicated fields and environmental variables are checked and the first one that is not defined or empty (i.e. contains to characters) is presented to the user, indicating that it should be filled in. If everything checks out okay, then this module has no effect.

Fields and environmental variables to check are indicated as arguments on the pipeline and are checked in order of listing. A '%' prefix on the argument indicates the argument is an environmental variable and a '$' prefix means a field, which is the default.

Examples username
makes sure the "username" field was filled out. If not, reports that to the user. %REMOTE_USER $realname
makes sure the "REMOTE_USER" environmental variable is set and that "realname" field was filled out. If not, reports that to the user.

Other Notes

The current version number is 1.0.

This module should work on any platform with a perl version 5 and CGI FPI implementation.

This module can be used more than once in the pipeline.

[HFPM Home] [Please comment]
Copyright © by James Hoagland |
28 January 1996