Phoenix.pm: ANNOUNCE: CGI::AppError

Douglas E. Miles doug.miles at bpxinternet.com
Wed Apr 5 15:03:15 CDT 2000


Here is the module I mentioned last night.  I'm looking for feedback on
documentation, name, implementation, and usefulness.  Depending on
feedback, I might consider posting to CPAN.  Thanks!  Here's the docs:

NAME
    CGI::AppError - HTML template-based error pages for CGI

SYNOPSIS
      use CGI::AppError;

      CGI::AppError::set_template();
      CGI::AppError::set_template('/path/to/my/template.html');

DESCRIPTION
    CGI::AppError allows you to display CGI application errors on
    custom HTML pages. CGI::AppError sets a $SIG{__DIE__} handler to
    diplay all fatal errors to the browser.

  CREATING THE TEMPLATE

    The only required element in the template is this comment:

    `<!-- Error Message -->'

    wherever the error message should appear. This comment can
    appear more than once if desired.

  SETTING THE TEMPLATE

    Use CGI::AppError::set_template() to indicate the path and
    filename of the template to use. If no template is specified, a
    bare-bones default page is used.

  DISPLAYING ERRORS

    To display an error to the browser, all that is necessary is to
    call die:

    `die "Required field missing"';

    and the error will be inserted into the template, and sent to
    standard out, to be displayed by the browser.

AUTHOR
    Douglas E. Miles (dmiles at primenet.com)

SEE ALSO
    perl(1).

COPYRIGHT
    Copyright (c) 2000, Douglas E. Miles. All Rights Reserved. This
    module is free software. It may be used, redistributed and/or
    modified under the terms of the Perl Artistic License (see
    http://www.perl.com/perl/misc/Artistic.html)

-- 
- Doug

Socrates is a man. All men are mortal. Therefore, all mortals are
Socrates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CGI-AppError-0.01.tar.gz
Type: application/x-gzip
Size: 2339 bytes
Desc: not available
Url : http://mail.pm.org/archives/phoenix-pm/attachments/20000405/c5632675/CGI-AppError-0.01.tar.bin


More information about the Phoenix-pm mailing list