Name

Web::ComposableRequest::Role::Cookie - Adds cookies to the request class

Synopsis

   package Your::Request::Class;

   use Moo;

   extends 'Web::ComposableRequest::Base';
   with    'Web::ComposableRequest::Role::Cookie';

Description

Adds cookies to the request class

Configuration and Environment

Defines the following attributes;

cookies

A hash reference of cookies supplied with the request

Defines the following configuration attributes

prefix

A required non empty simple string. Prepended to the cookie name

Subroutines/Methods

   my $hash_ref = $req->get_cookie_hash( $cookie_name );

The configuration prefix is prepended to the cookie name. That key is used lookup a cookie in the "cookies" hash. That cookie is decoded to produce the hash reference returned by this method. The encoding separates pairs with the + character and separates keys and values with the ~ character

Diagnostics

None

Dependencies

CGI::Simple::Cookie

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Web-ComposableRequest. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <pjfl@cpan.org>

License and Copyright

Copyright (c) 2017 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE