The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mojo::Cookie::Response - Response Cookies

SYNOPSIS

    use Mojo::Cookie::Response;

    my $cookie = Mojo::Cookie::Response->new;
    $cookie->name('foo');
    $cookie->value('bar');

    print "$cookie";

DESCRIPTION

Mojo::Cookie::Response is a generic container for HTTP response cookies.

ATTRIBUTES

Mojo::Cookie::Response inherits all attributes from Mojo::Cookie and implements the followign new ones.

comment

    my $comment = $cookie->comment;
    $cookie     = $cookie->comment('test 123');

domain

    my $domain = $cookie->domain;
    $cookie    = $cookie->domain('localhost');

expires

    my $expires = $cookie->expires;
    $cookie     = $cookie->expires(time + 60);

httponly

    my $httponly = $cookie->httponly;
    $cookie      = $cookie->httponly(1);

max_age

    my $max_age = $cookie->max_age;
    $cookie     = $cookie->max_age(60);

port

    my $port = $cookie->port;
    $cookie  = $cookie->port('80 8080');

secure

    my $secure = $cookie->secure;
    $cookie    = $cookie->secure(1);

METHODS

Mojo::Cookie::Response inherits all methods from Mojo::Cookie and implements the following new ones.

parse

    my @cookies = $cookie->parse('f=b; Version=1; Path=/');

to_string

    my $string = $cookie->to_string;