Mojo::Cookie::Response - Response Cookies
use Mojo::Cookie::Response; my $cookie = Mojo::Cookie::Response->new; $cookie->name('foo'); $cookie->value('bar'); print "$cookie";
Mojo::Cookie::Response is a generic container for HTTP response cookies.
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);
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;
To install Mojo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo
CPAN shell
perl -MCPAN -e shell install Mojo
For more information on module installation, please visit the detailed CPAN module installation guide.