Mojo::Server::CGI(3)
π NAME
Okay bestie, this is the User Contributed Perl Documentation for Mojo::Server::CGI(3) β aka Mojo::Server::CGI, the CGI server. π
β¨ SYNOPSIS
Here's the vibe in code form, bestie:
use Mojo::Server::CGI;
my $cgi = Mojo::Server::CGI->new;
$cgi->unsubscribe('request')->on(request => sub ($cgi, $tx) {
# Request
my $method = $tx->req->method;
my $path = $tx->req->url->path;
# Response
$tx->res->code(200);
$tx->res->headers->content_type('text/plain');
$tx->res->body("$method request for $path!");
# Resume transaction
$tx->resume;
});
$cgi->run;
πΈ DESCRIPTION
Mojo::Server::CGI is a simple and portable implementation of RFC 3875 (https://tools.ietf.org/html/rfc3875). Literally iconic behavior. π
For more, see "DEPLOYMENT" in Mojolicious::Guides::Cookbook. π«Ά
π EVENTS
Event check: Mojo::Server::CGI inherits all events from Mojo::Server. That's the event tea. π«
π¦ ATTRIBUTES
It inherits all attributes from Mojo::Server and implements the following new ones. π
π
nph
my $bool = $cgi->nph;
$cgi = $cgi->nph($bool);
Activate non-parsed header mode. That's the whole nph moment. β¨
π₯ METHODS
It inherits all methods from Mojo::Server and implements the following new ones. π
π run
my $status = $cgi->run;
Run CGI. Short, sweet, slay. π
π SEE ALSO
MojoliciousMojolicious::Guides<https://mojolicious.org>
okay bestie, that's the whole page! π It's from perl v5.42.0, dated 2026-07-15, and it's the manual for Mojo::Server::CGI(3). Periodt. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Mojolicious 9.480.0-bp160.2.1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms