Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.28 CGI::CookieChapter 8
Standard Modules
Next: Reference: as_string
 

new

$c = new CGI::Cookie(attribs)

Constructor. Creates a new cookie. Attributes are:

-domain = domain_name

Optional, points to domain name or fully qualified hostname to which cookie will be returned. If missing, browser will return cookie only to the server that set it.

-expires = date

Optional expiration date, in any of the date formats recognized by CGI.pm. If missing, cookie expires at the end of this browser session.

-name = name

Required. Scalar value with the cookie name.

-path = path

Optional, points to a partial URL on the current server; cookies will be returned to any URL beginning with this path. Defaults to /.

-secure = boolean

Optional. If true, browser will only return cookie if a cryptographic protocol is in use.

-value = value

Required. The value of the cookie; can be a scalar, an array reference, or a hash reference.


Previous: 8.28 CGI::CookiePerl in a NutshellNext: Reference: as_string
8.28 CGI::CookieBook IndexReference: as_string