Build a MyCookie module that works like Mojolicious::Sessions
<https://mojolicious.org/perldoc/Mojolicious/Sessions.txt>, and a helper
"mycookie" that does what "session" does
<https://metacpan.org/source/SRI/Mojolicious-8.12/lib/Mojolicious/Controller.pm#L214>,
but using MyCookie.

Here's my prototype attempt
<https://gist.github.com/s1037989/84a365f4afb6ebd987557802a5482a57> at it.
I think it should be crafted as a plugin and of course you'll want to
modify the logic so that it behaves as you intend.  But the prototype, at
least, demonstrates how it could be done completely independently from
Mojo's session cookie.

On Fri, Feb 1, 2019 at 5:04 PM Viktor Nacht <viktor.na...@gmail.com> wrote:

> I really love the "it just works" interface of Mojo's session cookie, and
> I was disappointed that I can't use that same kind of approach to other
> cookies. I wrote a helper to de/serialize my non-session cookies
> automatically, but that's still a step away from the amazing awesomeness of
> sessions. Is there a way I haven't thought of yet to use
> a Mojolicious::Sessions object for a non-session cookie that won't
> interfere with the normal sessions' expiration and values, etc?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to