CatalystX::Usul::TraitFor::Controller::Cookies - Cookie multiplexing methods
Describes v0.17.$Rev: 1 $
package YourApp::Controller::YourController; use CatalystX::Usul::Moose; BEGIN { extends q(CatalystX::Usul::Controller) } sub foo { my ($self, $c) = @_; $cookie_value = $self->get_state_cookie( $c, $cookie_key ); }
Allows for multiple key/value pairs to be stored in a single cookie
Requires get_browser_state
get_browser_state
$bool = $self->delete_cookie( $c, { name => $cookie_name, key => $k } );
Deletes the key / value pair from the named cookie
$bool = $self->set_state_cookie( $c, $cookie_key );
Deletes the key / value pair from the state cookie and returns true if the pair was deleted, false otherwise
Modifies the base controller method. Stash key/value pairs from the browser state cookie
$value = $self->get_cookie( $c, { name => $cookie_name, key => $k } );
Get a key/value pair from the named cookie
$cookie_value = $self->set_state_cookie( $c, $cookie_key );
Returns the value from the state cookie for the specified key
$value = $self->set_cookie( $c, { name => $name, key => $k, value => $v } );
Sets a key / value pair in the named cookie
$cookie_value = $self->set_state_cookie( $c, $cookie_key, $cookie_value );
Sets the key / value pair on the state cookie. Returns the value
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2014 Pete 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
To install CatalystX::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Usul
CPAN shell
perl -MCPAN -e shell install CatalystX::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.