Re: [Mojolicious] Re: Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Viktor Nacht
Ugh, you nailed it. I found a spot in my code that suffered from autovivification. Thank you. -- 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

Re: [Mojolicious] Re: Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Dan Book
It is just a hash at that point so none of those things should cause that. But if you accessed $c->session->{order}{anything} it would create a hash due to autovivification. -Dan On Thu, Jan 10, 2019 at 10:23 PM Viktor Nacht wrote: > *sigh* I meant: > > {"expires":1547178562,"order":{}} > > --

[Mojolicious] Re: Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Viktor Nacht
*sigh* I meant: {"expires":1547178562,"order":{}} -- 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

[Mojolicious] Test Existence of Key in Session Hash Without Creating Element

2019-01-10 Thread Viktor Nacht
So if you do something like: if ($c->session->{order}) { # process order } The session cookie looks something like this: {"expires":1547178562,"cart":{}} Is there a way to test for the existing of keys in the session has that won't cause it to string into existence? Using 'exists' or