AppConfig::CGI(3pm)

AppConfig::CGI3pm

Perl5 module for processing cgi script parameters.

Usage

    use AppConfig::CGI;
    my $state = AppConfig::State->new(\%cfg);
    my $cgi   = AppConfig::CGI->new($state);
    $cgi->parse($cgi_query);
    $cgi->parse();               # looks for CGI query in environment

Overview

AppConfig::CGI is a Perl5 module which implements a CGI interface to AppConfig. It examines the QUERY_STRING environment variable, or a string passed explicitly by parameter, which represents the additional parameters passed to a CGI query. This is then used to update variable values in an AppConfig::State object accordingly.

AppConfig::CGI is distributed as part of the AppConfig bundle.

Overview

USING THE AppConfig::CGI MODULE

To import and use the AppConfig::CGI module the following line should appear in your Perl script:

    use AppConfig::CGI;

AppConfig::CGI is used automatically if you use the AppConfig module and create an AppConfig::CGI object through the cgi() method. AppConfig::CGI is implemented using object-oriented methods. A new AppConfig::CGI object is created and initialised using the new() method. This returns a reference to a new AppConfig::CGI object. A reference to an AppConfig::State object should be passed in as the first parameter:

    my $state = AppConfig::State->new(); 
    my $cgi   = AppConfig::CGI->new($state);

This will create and return a reference to a new AppConfig::CGI object.

Parsing cgi queries

The parse() method is used to parse a CGI query which can be specified explicitly, or is automatically extracted from the "QUERY_STRING" CGI environment variable. This currently limits the module to only supporting the GET method.

See AppConfig for information about using the AppConfig::CGI module via the cgi() method.

Releases

12 releases since Debian 3.1 (Sarge); the text changed 7 times.

  1. 3.1–6.0
  2. 7–8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13
  8. Arch

Author

Andy Wardley, "<[email protected]<gt">

From perl-appconfig 1.71-15 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.