GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::Server::Simple::CGI(3) User Contributed Perl Documentation HTTP::Server::Simple::CGI(3)

HTTP::Server::Simple::CGI - CGI.pm-style version of HTTP::Server::Simple

HTTP::Server::Simple was already simple, but some smart-ass pointed out that there is no CGI in HTTP, and so this module was born to isolate the CGI.pm-related parts of this handler.

The accept_hook in this sub-class clears the environment to the start-up state.

Initializes the global CGI object, as well as other environment settings.

Gets or sets the class to use for creating the $cgi object passed to "handle_request".

Called with a single argument, it sets the coderef. Called with no arguments, it returns this field's current value.

To provide an initialization subroutine to be run in the post_setup_hook, see "cgi_init".

e.g.

    $server->cgi_class('CGI');

    $server->cgi_init(sub {
        require CGI;
        CGI::initialize_globals();
    });

or, if you want to use CGI::Simple,

    $server->cgi_class('CGI::Simple');
    $server->cgi_init(sub {
        require CGI::Simple;
    });

A coderef to run in the post_setup_hook.

Called with a single argument, it sets the coderef. Called with no arguments, it returns this field's current value.

This method sets up CGI environment variables based on various meta-headers, like the protocol, remote host name, request path, etc.

See the docs in HTTP::Server::Simple for more detail.

This routine is called whenever your server gets a request it can handle.

It's called with a CGI object that's been pre-initialized. You want to override this method in your subclass

Handler implemented as part of HTTP::Server::Simple API
2015-12-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.