![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Multiple cookies in Catalyst, one longlasting and one session cookieby martell (Hermit) |
on Aug 27, 2020 at 19:33 UTC ( [id://11121133]=note: print w/replies, xml ) | Need Help?? |
Responding to my own post because i've found a solution for this problem. It is actually straightforward: Set a extra cookie by adding in your function:
This will automatically add a cookie when the response is send. You can test for the presence of a cookie by testing if the request has a cookie with the given name:
If the value is set, the cookie exists. You can use the value to record the type of consent the user is given. It is now up to you to react appropriately on the presence or absence of the cookie. Hopes this help other. I've been looking for the answer quite some time and had given up. Found the answer after searching for a different problem. Kind regards
In Section
Seekers of Perl Wisdom
|
|