NAME

Pod::Usage::CGI - generate usage message for CGI scripts

SYNOPSIS

use CGI;
use Pod::Usage::CGI;

#Message is HTML-escaped
my $necessary = CGI::param(foo) || pod2usage(message => "you forgot >>foo<<");

#Raw message is not escaped
my $another   = CGI::param(bar) || pod2usage(raw_message => "you forgot <b>bar</b>");

DESCRIPTION

Provides pod2usage exit from CGI scripts. You may optionally supply a message. By default the message text is escaped to prevent cross-site scripting injection attacks and placed in a div container of class "message" that you can optionally format with a CSS. You can use the raw_message directive if you want to write HTML out into the page and manage your own escaping.

The module works fine under Apache::Registry but will not work in any environments where $0 is not defined.

FUNCTIONS

pod2usage(%options)

Displays usage and exits. Valid options are:

message - message (will be automatically escaped)
raw_message - message (not escaped)
css - one or more CSS URLs to be applied to the page (either a scalar or an arrayref)

DEPENDENCIES

Pod::XHtml and either Apache or CGI are loaded on demand if required

SEE ALSO

Pod::Usage

Generates usage messages for command line scripts

VERSION

$Revision: 1.9 $ on $Date: 2005/03/14 15:56:13 $ by $Author: tonyh $

AUTHOR

John Alden <cpan _at_ bbc _dot_ co _dot_ uk>

COPYRIGHT

(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL. See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt