Merge pull request #2890 from solgenomics/topic/check_login_always
[sgn.git] / lib / CXGN / Cookie.pm
blob29ef0e59012427279371e7b9c2b8fdade78029a5
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} = { value => $value };