|
NAMEHTTP::XSCookies - Fast XS cookie mangling for PerlVERSIONVersion 0.000021SYNOPSISuse HTTP::XSCookies qw/bake_cookie crush_cookie/; my $cookie = bake_cookie('Perl&C' => 'They rulez!'); my $values = crush_cookie($cookie); DESCRIPTIONThis module implements cookie creation (baking) and parsing (crushing) using XS, therefore improving the speed of a pure Perl implementation.METHODS/ATTRIBUTESbake_cookiemy $cookie = bake_cookie('foo' => 'bar'); my $cookie = bake_cookie('baz', { value => 'Frodo', path => 'myPath', domain => '.test.com', expires => '+11h' }); Generate a cookie string with proper encoding. The first argument is the cookie name; the second argument can be a string (the cookie value) or a hashref with a set of key-value pairs. The value for any of these attributes can be an arrayref (multi-valued cookie); if this is the case, the elements of the array will be concatenated with an '&' character and the whole string will be URL-encoded. These are the keys that are recognized:
crush_cookiemy $values = crush_cookie( $cookie [, $allow_no_value] ); Parse a (properly encoded) cookie string into a hashref with the individual values. If the second parameter is non-zero, the parsing will allow for attributes without a value, and set those to have a value of undef in the returned hashref (so that they can easily be differentiated from an attribute with an explicit value). The default is 0. If any of the (URL-decoded) values contains an '&' character, that value is interpreted as multiple values, so an arrayref of each separate component is returned. SEE ALSOCookie::Baker.LICENSECopyright (C) Gonzalo Diethelm.This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. AUTHOR
THANKS
Visit the GSP FreeBSD Man Page Interface. |