Search notes:

Perl module HTTP::Server::Simple::CGI

use warnings; use strict;

use HTTP::Server::Simple::CGI;

{ package WebServer; use base 'HTTP::Server::Simple::CGI';

my $nl = "\x0d\x0a";

sub handle_request { # {{{

    my $self = shift;
    my $cgi  = shift;

    print "HTTP/1.0 200 OK$nl";
    print "Content-Type: text/html; charset=utf-8$nl$nl";

    print "<h1>Hällö Wörld</h1>";

    print "<code>\$cgi-&gt;path_info: </code> " . $cgi->path_info;

} # }}}

}

my $pid = WebServer -> new(8080) -> background;
Github repository PerlModules, path: /HTTP/Server/Simple/CGI/script.pl

See also

A (very) simple webserver using the Perl module HTTP::Server::Simple::CGI.
Perl modules such as CGI.
CGI
Shell scripts to start Web Servers

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1737202459, '18.191.150.173', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/HTTP/Server/Simple/CGI/index(71): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78