# HTTP::Server::Simple::CGI::Environment(3pm) - man - phpMan

## NAME
    [HTTP::Server::Simple::CGI::Environment](https://www.chedong.com/phpMan.php/perldoc/HTTP%3A%3AServer%3A%3ASimple%3A%3ACGI%3A%3AEnvironment/markdown) - a [HTTP::Server::Simple](https://www.chedong.com/phpMan.php/perldoc/HTTP%3A%3AServer%3A%3ASimple/markdown) mixin to
    provide the CGI protocol

## DESCRIPTION
    This mixin abstracts the CGI protocol out from [HTTP::Server::Simple::CGI](https://www.chedong.com/phpMan.php/perldoc/HTTP%3A%3AServer%3A%3ASimple%3A%3ACGI/markdown)
    so that it's easier to provide your own CGI handlers with
    [HTTP::Server::Simple](https://www.chedong.com/phpMan.php/perldoc/HTTP%3A%3AServer%3A%3ASimple/markdown) which don't use CGI.pm

  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
    Sets up the "SERVER_URL" environment variable

  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](https://www.chedong.com/phpMan.php/perldoc/HTTP%3A%3AServer%3A%3ASimple/markdown) for more detail.

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

