Module

CGI::QueryExtension

Inheritance

Mixin module. It provides the follow functionality groups:

  1. Access to CGI environment variables as methods. See documentation to the CGI class for a list of these variables.
  2. Access to cookies, including the cookies attribute.
  3. Access to parameters, including the params attribute, and overloading
    to perform parameter value lookup by key.
  4. The initialize_query method, for initialising the above mechanisms, handling multipart forms, and allowing the class to be used in "offline" mode.

Attributes

Name Visibility R/W Description
cookies public RW Get the cookies as a hash of cookie-name=>Cookie pairs.
params public R Get the parameters as a hash of name=>values pairs, where values is an Array.

Aliases

Method Alias Description
path → local_path

Methods

Instance

Visibility Signature
public [] (key)
public has_key? (*args)
public include? (*args)
public key? (*args)
public keys (*args)
public multipart? ()
public params= (hash)
public raw_cookie ()
public raw_cookie2 ()

Instance Method Detail

[](key)

Get the value for the parameter with a given key.

If the parameter has multiple values, only the first will be retrieved; use params() to get the array of values.

has_key?(*args)

Returns true if a given parameter key exists in the query.

include?(*args)

Alias for has_key?

key?(*args)

Alias for has_key?

keys(*args)

Return all parameter keys as an array.

multipart?()

params=(hash)

Set all the parameters.

raw_cookie()

Get the raw cookies as a string.

raw_cookie2()

Get the raw RFC2965 cookies as a string.