1Mojo::Cookie::Response(U3s)er Contributed Perl DocumentatMioojno::Cookie::Response(3)
2
3
4

NAME

6       Mojo::Cookie::Response - HTTP 1.1 Response Cookie Container
7

SYNOPSIS

9           use Mojo::Cookie::Response;
10
11           my $cookie = Mojo::Cookie::Response->new;
12           $cookie->name('foo');
13           $cookie->value('bar');
14
15           print "$cookie";
16

DESCRIPTION

18       Mojo::Cookie::Response is a container for HTTP 1.1 response cookies as
19       described in RFC 2965.
20

ATTRIBUTES

22       Mojo::Cookie::Response inherits all attributes from Mojo::Cookie and
23       implements the followign new ones.
24
25   "comment"
26           my $comment = $cookie->comment;
27           $cookie     = $cookie->comment('test 123');
28
29       Cookie comment.
30
31   "domain"
32           my $domain = $cookie->domain;
33           $cookie    = $cookie->domain('localhost');
34
35       Cookie domain.
36
37   "httponly"
38           my $httponly = $cookie->httponly;
39           $cookie      = $cookie->httponly(1);
40
41       HTTP only flag.
42
43   "max_age"
44           my $max_age = $cookie->max_age;
45           $cookie     = $cookie->max_age(60);
46
47       Max age for cookie in seconds.
48
49   "port"
50           my $port = $cookie->port;
51           $cookie  = $cookie->port('80 8080');
52
53       Cookie port.
54
55   "secure"
56           my $secure = $cookie->secure;
57           $cookie    = $cookie->secure(1);
58
59       Secure flag.
60

METHODS

62       Mojo::Cookie::Response inherits all methods from Mojo::Cookie and
63       implements the following new ones.
64
65   "expires"
66           my $expires = $cookie->expires;
67           $cookie     = $cookie->expires(time + 60);
68
69       Expiration for cookie in seconds.
70
71   "parse"
72           my $cookies = $cookie->parse('f=b; Version=1; Path=/');
73
74       Parse cookies.
75
76   "to_string"
77           my $string = $cookie->to_string;
78
79       Render cookie.
80

SEE ALSO

82       Mojolicious, Mojolicious::Guides, <http://mojolicious.org>.
83
84
85
86perl v5.12.3                      2010-08-12         Mojo::Cookie::Response(3)
Impressum