NAME

Mojo::Cookie - Cookie Base Class

SYNOPSIS

    use base 'Mojo::Cookie';

DESCRIPTION

Mojo::Cookie is a cookie base class.

ATTRIBUTES

Mojo::Cookie implements the following attributes.

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);

name

    my $name = $cookie->name;
    $cookie  = $cookie->name('foo');

path

    my $path = $cookie->path;
    $cookie  = $cookie->path('/test');

port

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

secure

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

value

    my $value = $cookie->value;
    $cookie   = $cookie->value('/test');

version

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

METHODS

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

to_string

    my $string = $cookie->to_string;