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

# [NAME](#NAME)

HTTP::Server::Simple::CGI::Environment - a HTTP::Server::Simple mixin to provide the CGI protocol

# [DESCRIPTION](#DESCRIPTION)

This mixin abstracts the CGI protocol out from HTTP::Server::Simple::CGI so that it's easier to provide your own CGI handlers with HTTP::Server::Simple which **don't** use CGI.pm

## [setup\_environment](#setup_environment)

"setup\_environemnt" is usually called in the superclass's accept\_hook

This routine in this sub-class clears the environment to the start-up state.

## [setup\_server\_url](#setup_server_url)

Sets up the "SERVER\_URL" environment variable

## [setup\_environment\_from\_metadata](#setup_environment_from_metadata)

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.

## [header](#header)

"header" turns a single HTTP headers into CGI environment variables.

2026-09-06 perl v5.44.0

---

Document: HTTP::Server::Simple::CGI::Environment(3pm) from perl-http-server-simple 0.52-r3 (Chainguard OS)
Source: https://github.com/bestpractical/http-server-simple.git
