Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cgi::cookie::splitter(3pm) [debian man page]

CGI::Cookie::Splitter(3pm)				User Contributed Perl Documentation				CGI::Cookie::Splitter(3pm)

NAME
CGI::Cookie::Splitter - Split big cookies into smaller ones. SYNOPSIS
use CGI::Cookie::Splitter; my $splitter = CGI::Cookie::Splitter->new( size => 123, # defaults to 4096 ); @small_cookies = $splitter->split( @big_cookies ); @big_cookies = $splitter->join( @small_cookies ); DESCRIPTION
RFC 2109 reccomends that the minimal cookie size supported by the client is 4096 bytes. This has become a pretty standard value, and if your server sends larger cookies than that it's considered a no-no. This module provides a pretty simple interface to generate small cookies that are under a certain limit, without wasting too much effort. METHODS
new %params The only supported parameters right now are "size". It defaults to 4096. split @cookies This method accepts a list of CGI::Cookie objects (or look alikes) and returns a list of CGI::Cookies. Whenever an object with a total size that is bigger than the limit specified at construction time is encountered it is replaced in the result list with several objects of the same class, which are assigned serial names and have a smaller size and the same domain/path/expires/secure parameters. join @cookies This is the inverse of "split". should_split $cookie Whether or not the cookie should be split mangle_name_next $name Demangles name, increments the index and remangles. mangle_name $name, $index demangle_name $mangled_name These methods encapsulate a name mangling scheme for changing the cookie names to allo wa 1:n relationship. The default mangling behavior is not 100% safe because cookies with a safe size are not mangled. As long as your cookie names don't start with the substring "_bigcookie_" you should be OK ;-) SUBCLASSING
This module is designed to be easily subclassed... If you need to split cookies using a different criteria then you should look into that. SEE ALSO
CGI::Cookie, CGI::Simple::Cookie, <http://www.cookiecutter.com/>, http://perlcabal.org/~gaal/metapatch/images/copper-moose-cutter.jpg <http://perlcabal.org/~gaal/metapatch/images/copper-moose-cutter.jpg>, RFC 2109 VERSION CONTROL
This module is maintained using Darcs. You can get the latest version from http://nothingmuch.woobling.org/CGI-Cookie-Splitter/ <http://nothingmuch.woobling.org/CGI-Cookie-Splitter/>, and use "darcs send" to commit changes. AUTHOR
Yuval Kogman, "nothingmuch@woobling.org" COPYRIGHT &; LICENCE Copyright (c) 2006 the aforementioned authors. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2007-01-29 CGI::Cookie::Splitter(3pm)

Check Out this Related Man Page

Mojo::Cookie::Response(3pm)				User Contributed Perl Documentation			       Mojo::Cookie::Response(3pm)

NAME
Mojo::Cookie::Response - HTTP 1.1 response cookie container SYNOPSIS
use Mojo::Cookie::Response; my $cookie = Mojo::Cookie::Response->new; $cookie->name('foo'); $cookie->value('bar'); say $cookie; DESCRIPTION
Mojo::Cookie::Response is a container for HTTP 1.1 response cookies. ATTRIBUTES
Mojo::Cookie::Response inherits all attributes from Mojo::Cookie and implements the followign new ones. "domain" my $domain = $cookie->domain; $cookie = $cookie->domain('localhost'); Cookie domain. "httponly" my $httponly = $cookie->httponly; $cookie = $cookie->httponly(1); HttpOnly flag, which can prevent client side scripts from accessing this cookie. "max_age" my $max_age = $cookie->max_age; $cookie = $cookie->max_age(60); Max age for cookie in seconds. "path" my $path = $cookie->path; $cookie = $cookie->path('/test'); Cookie path. "secure" my $secure = $cookie->secure; $cookie = $cookie->secure(1); Secure flag, which instructs browsers to only send this cookie over HTTPS connections. METHODS
Mojo::Cookie::Response inherits all methods from Mojo::Cookie and implements the following new ones. "expires" my $expires = $cookie->expires; $cookie = $cookie->expires(time + 60); $cookie = $cookie->expires(Mojo::Date->new(time + 60)); Expiration for cookie in seconds. "parse" my $cookies = $cookie->parse('f=b; path=/'); Parse cookies. "to_string" my $string = $cookie->to_string; Render cookie. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::Cookie::Response(3pm)
Man Page