HTTP::S...ple::CGI(3)
π HTTP::Server::Simple::CGI(3) π
okay bestie, this is the User Contributed Perl Documentation page for HTTP::Server::Simple::CGI π itβs the CGI.pm-ish flavor of the server, and we are keeping every single detail because thatβs the whole vibe.
πΈ NAME πΈ
HTTP::Server::Simple::CGI β CGI.pm-style version of HTTP::Server::Simple.
β¨ DESCRIPTION β¨
okay so 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. slay, honestly.
π«Ά accept_hook
The accept_hook in this sub-class clears the environment to the start-up state.
π¦ post_setup_hook
Initializes the global CGI object, as well as other environment settings.
π cgi_class [Classname]
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;
});
π cgi_init [CODEREF]
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.
π setup
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.
π₯ handle_request CGI
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
Handler implemented as part of HTTP::Server::Simple API.
okay thatβs the whole page, bestie π this little gem is from perl v5.42.0, dated 2017-04-01, and the footer is doing its HTTP::S...ple::CGI(3) thing β periodt πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-HTTP-Server-Simple 0.52-bp160.1.12 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms