PSP::CGI::HTTP - exportable functions for generating HTTP status pages.
use PSP::CGI::HTTP; my $success; $success = PSP::CGI::HTTP::redirect($psp,$url,$code); $success = PSP::CGI::HTTP::notFound($psp,$url); $success = PSP::CGI::HTTP::status($psp,$url,$code,$codeName,$message,%extraHeaders); use PSP::CGI::HTTP qw(redirect notFound status); my $success; $success = redirect($psp,$url,$code); $success = notFound($psp,$url); $success = status($psp,$code,$codeName,$message,%extraHeaders);
This module provides exportable functions that create HTTP status pages commonly used in CGI programs i.e. for redirecting the browser to another URL, telling the browser about missing files, etc.. This module was created as a companion to the Perl Script Pages Engine. See the PSP::Engine manpage for more information.
Creates a HTTP redirect (``Moved'') message, redirecting the web browser to another URL.
use PSP::CGI::HTTP; my $success = PSP::CGI::HTTP::redirect($psp,$url,$code); use PSP::CGI::HTTP qw(redirect); my $success = redirect($psp,$url,$code);
Former content of the PSP output queue and CGI headers are flushed.
This function can be exported.
Creates a HTTP 404 (``Not Found'') message, telling the web browser the requested URL does not exist.
use PSP::CGI::HTTP; my $success = PSP::CGI::HTTP::notFound($psp,$url); use PSP::CGI::HTTP qw(notFound); my $success = notFound($psp,$url);
Former content of the PSP output queue and CGI headers are flushed.
This function can be exported.
None.
Creates a user defined HTTP status message.
use PSP::CGI::HTTP; my $success = PSP::CGI::HTTP::status($psp,$url,$code,$codeName,$message,%extraHeaders); use PSP::CGI::HTTP qw(status); my $success = status($psp,$code,$codeName,$message,%extraHeaders);
Former content of the PSP output queue and CGI headers are flushed.
This function can be exported.
Veit Wahlich
E-Mail: cru |at| zodia |dot| de
WWW: http://home.ircnet.de/cru/
v0.7 Wednesday, 18 January 2006
Copyright 2004-2006 Veit Wahlich
This software is distributed as free (libre) software under the terms of the GNU General Public License, version 2 <http://www.gnu.org/copyleft/gpl.html>. The author disclaims responsibility of any damage or harm caused directly or indirectly by usage of this software. Use only at your own risk.