CGI::Cookie(3perl)

CGI::Cookie3perl

Interface to http cookies

Usage

    use CGI qw/:standard/;
    use CGI::Cookie;
    # Create new cookies and send them
    $cookie1 = CGI::Cookie->new(-name=>'ID',-value=>123456);
    $cookie2 = CGI::Cookie->new(-name=>'preferences',
                               -value=>{ font => Helvetica,
                                         size => 12 } 
                               );
    print header(-cookie=>[$cookie1,$cookie2]);
    # fetch existing cookies
    %cookies = CGI::Cookie->fetch;
    $id = $cookies{'ID'}->value;
    # create cookies returned from an external source
    %cookies = CGI::Cookie->parse($ENV{COOKIE});

Overview

CGI::Cookie is an interface to HTTP/1.1 cookies, an innovation that allows Web servers to store persistent information on the browser's side of the connection. Although CGI::Cookie is intended to be used in conjunction with CGI.pm (and is in fact used by it internally), you can use this module independently.

For full information on cookies see

        http://tools.ietf.org/html/rfc2109
        http://tools.ietf.org/html/rfc2965
        http://tools.ietf.org/html/draft-ietf-httpstate-cookie

Author information

Copyright 1997-1998, Lincoln D. Stein. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Address bug reports and comments to: [email protected]

Releases

7 releases since Debian 3.0 (Woody); the text changed 6 times.

  1. 3.0
  2. 3.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7
  7. 8

Bugs

This section intentionally left blank.

From perl-doc 5.20.2-3+deb8u11 in Debian 8 (Jessie). Parsed by carta from the page's man source.