1OpenFrame::Cookies(3) User Contributed Perl DocumentationOpenFrame::Cookies(3)
2
3
4

NAME

6       OpenFrame::Cookies - An abstract cookie class
7

SYNOPSIS

9         use OpenFrame;
10         my $cookies = OpenFrame::Cookies->new();
11         $cookies->set("animal" => "parrot");
12         my $colour = $cookies->get("colour")->value;
13         $cookies->delete("colour");
14         my %cookies = $cookies->get_all();
15

DESCRIPTION

17       "OpenFrame::Cookies" represents cookies inside OpenFrame. Cookies in
18       OpenFrame represent some kind of storage option on the requesting side.
19
20       Cookies are a general mechanism which server side connections can use
21       to both store and retrieve information on the client side of the con‐
22       nection. The addition of a simple, persistent, client-side state sig‐
23       nificantly extends the capabilities of Web-based client/server applica‐
24       tions. "OpenFrame::Cookies" is an abstract cookie class for OpenFrame
25       which can represent cookies no matter how they really come to exist
26       outside OpenFrame (such as CGI or Apache cookie objects).
27

METHODS

29       new()
30
31       The new() method creates a new "OpenFrame::Cookies" object. These can
32       hold multiple cookies (although they must have unique names) inside the
33       cookie tin.
34
35         my $cookies = OpenFrame::Cookies->new();
36
37       set()
38
39       The set() method adds an entry:
40
41         $cookies->set("animal" => "parrot");
42
43       get()
44
45       The get() method returns a cookie (a "OpenFrame::Cookie" object) given
46       its name:
47
48         my $colour = $cookies->get("colour")->value;
49
50       delete()
51
52       The delete() method removes a cookie element given its name:
53
54         $cookies->delete("colour");
55
56       get_all()
57
58       The get_all() method returns a hash of all the cookies:
59
60         my %cookies = $cookies->get_all();
61

AUTHOR

63       James Duncan <jduncan@fotango.com>, Leon Brocard <leon@fotango.com>
64
65
66
67perl v5.8.8                       2004-08-05             OpenFrame::Cookies(3)
Impressum