SYNOPSIS

  use RefDB::CGI;

  if (RefDB::CGI::check_cgi("GET") == 0) {
      $template = RefDB::CGI::load_html("/usr/local/share/myapp/template.html");
  }

DESCRIPTION

Provides functions important to run RefDB scripts as \s-1CGI\s0 applications.

FEEDBACK

Send bug reports, questions, and comments to the refdb-users mailing list at:

[email protected]

For list information and archives, please visit:

http://lists.sourceforge.net/lists/listinfo/refdb-users

AUTHOR

Markus Hoenicka, [email protected]

RELATED TO RefDB::CGI…

This module is part of the RefDB package, a reference manager and bibliography tool for markup languages. Please visit http://refdb.sourceforge.net for further information.

package functions

check_cgi

Title : check_cgi

Usage : $cgi = check_cgi($mode);

Function: Checks whether app runs as a \s-1CGI\s0 app accepting \s-1GET\s0 or \s-1POST\s0 data

Argument: mode: either \*(L"\s-1GET\s0\*(R" or \*(L"\s-1POST\s0\*(R"

Returns : 0 if \s-1CGI\s0 app called properly

          1 if incorrect mode
          2 if missing content length of \s-1POST\s0 data
          3 if not \s-1CGI\s0 at all

load_html

Title : load_html

Usage : $template = load_html(\*(L"full/path/to/template.html\*(R")

Function: Reads a \s-1HTML\s0 template into a string

Returns : string if file was found, undef if not