GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mojo::Cookie(3) User Contributed Perl Documentation Mojo::Cookie(3)

Mojo::Cookie - HTTP cookie base class

  package Mojo::Cookie::MyCookie;
  use Mojo::Base 'Mojo::Cookie';

  sub parse     {...}
  sub to_string {...}

Mojo::Cookie is an abstract base class for HTTP cookie containers, based on RFC 6265 <https://tools.ietf.org/html/rfc6265>, like Mojo::Cookie::Request and Mojo::Cookie::Response.

Mojo::Cookie implements the following attributes.

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

Cookie name.

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

Cookie value.

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

  my $cookies = $cookie->parse($str);

Parse cookies. Meant to be overloaded in a subclass.

  my $str = $cookie->to_string;

Render cookie. Meant to be overloaded in a subclass.

Mojo::Cookie overloads the following operators.

  my $bool = !!$cookie;

Always true.

  my $str = "$cookie";

Alias for "to_string".

Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.
2021-12-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.