add is_variable accessor.
[sgn.git] / lib / CXGN / Cookie.pm
blob1e87b986b52dcef299e2c837970b22a0fb44483f
1 package CXGN::Cookie;
2 use strict;
3 use warnings;
5 use CatalystX::GlobalContext '$c';
7 =head1 CXGN::Cookie
9 Functions for using CXGN cookies. Deprecated.
11 =cut
13 sub get_cookie {
14 my $cookie = $c->req->cookie(shift)
15 or return;
16 return $cookie->value;
19 sub set_cookie {
20 my ( $name, $value ) = @_;
21 $value = '' unless defined $value;
22 $c->response->cookies->{$name} = {
23 value => $value,
24 samesite => 'Strict'