-
-
21 Oct 2021 11:53:53 UTC
- Distribution: Mojolicious
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (1961 / 52 / 38)
- Kwalitee
Bus factor: 6- 90.53% Coverage
- License: artistic_2
- Perl: v5.16.0
- Activity
24 month- Tools
- Download (821.64KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Mojo::Cookie - HTTP cookie base class
SYNOPSIS
package Mojo::Cookie::MyCookie; use Mojo::Base 'Mojo::Cookie'; sub parse {...} sub to_string {...}
DESCRIPTION
Mojo::Cookie is an abstract base class for HTTP cookie containers, based on RFC 6265, like Mojo::Cookie::Request and Mojo::Cookie::Response.
ATTRIBUTES
Mojo::Cookie implements the following attributes.
name
my $name = $cookie->name; $cookie = $cookie->name('foo');
Cookie name.
value
my $value = $cookie->value; $cookie = $cookie->value('/test');
Cookie value.
METHODS
Mojo::Cookie inherits all methods from Mojo::Base and implements the following new ones.
parse
my $cookies = $cookie->parse($str);
Parse cookies. Meant to be overloaded in a subclass.
to_string
my $str = $cookie->to_string;
Render cookie. Meant to be overloaded in a subclass.
OPERATORS
Mojo::Cookie overloads the following operators.
bool
my $bool = !!$cookie;
Always true.
stringify
my $str = "$cookie";
Alias for "to_string".
SEE ALSO
Module Install Instructions
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm Mojolicious
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.