1HTTP::Server::Simple::CUGsIe(r3)Contributed Perl DocumenHtTaTtPi:o:nServer::Simple::CGI(3)
2
3
4

NAME

6       HTTP::Server::Simple::CGI - CGI.pm-style version of
7       HTTP::Server::Simple
8

DESCRIPTION

10       HTTP::Server::Simple was already simple, but some smart-ass pointed out
11       that there is no CGI in HTTP, and so this module was born to isolate
12       the CGI.pm-related parts of this handler.
13
14   accept_hook
15       The accept_hook in this sub-class clears the environment to the start-
16       up state.
17
18   post_setup_hook
19       Initializes the global CGI object, as well as other environment
20       settings.
21
22   cgi_class [Classname]
23       Gets or sets the class to use for creating the $cgi object passed to
24       "handle_request".
25
26       Called with a single argument, it sets the coderef. Called with no
27       arguments, it returns this field's current value.
28
29       To provide an initialization subroutine to be run in the
30       post_setup_hook, see "cgi_init".
31
32       e.g.
33
34           $server->cgi_class('CGI');
35
36           $server->cgi_init(sub {
37               require CGI;
38               CGI::initialize_globals();
39           });
40
41       or, if you want to use CGI::Simple,
42
43           $server->cgi_class('CGI::Simple');
44           $server->cgi_init(sub {
45               require CGI::Simple;
46           });
47
48   cgi_init [CODEREF]
49       A coderef to run in the post_setup_hook.
50
51       Called with a single argument, it sets the coderef. Called with no
52       arguments, it returns this field's current value.
53
54   setup
55       This method sets up CGI environment variables based on various meta-
56       headers, like the protocol, remote host name, request path, etc.
57
58       See the docs in HTTP::Server::Simple for more detail.
59
60   handle_request CGI
61       This routine is called whenever your server gets a request it can
62       handle.
63
64       It's called with a CGI object that's been pre-initialized.  You want to
65       override this method in your subclass
66
67   handler
68       Handler implemented as part of HTTP::Server::Simple API
69
70
71
72perl v5.30.0                      2019-07-26      HTTP::Server::Simple::CGI(3)
Impressum