formatted_show.pl

Description

Formatted_show.pl is a HFPM module that instantiates (fills in) a file with field values and environmental variable values and displays the result to the user.

Usage

formatted_show.pl formatfile [mime-type] in the pipeline.

Usage Explanation

The file indicated as the first argument on the pipeline is instantiated with field values and environmental variable values as in variable encoded format. The result is returned to the user through his or her client.

If the formatfile can't be found, the value of field "_comment_dir" is used as the base directory for the formatfile if that field is defined.

If the second argument is given, it indicates the MIME-type of the what is returned, otherwise it is assumed to the HTML. Examples are 'text/html', 'text/plain', and 'application/postscript'.

Examples

"formatted_show.pl /usr/www/comments/showformat" on the pipeline
Instantiates "/usr/www/comments/showformat" and returns it as HTML.
"formatted_show.pl showformat text/plain" on the pipeline and "/usr/web/comments" in the field "_comment_dir"
Instantiates "/usr/web/comments/showformat" (unless a file "showformat" is found in the current directory) and returns it as plain text.

Other Notes

The current version number is 1.0.

This module is not 8-bit character clean; character 255 may be clobbered. You can use the returnurl.pl module to return a fixed (possibly binary) file.

The is module should work on any Unix machine.

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

See Also

The variable encoded format used to encode the fields and environmental variables.
[HFPM Home] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
29 January 1996