-
|
if i writte $c->session->{foo} = 'bar'; any example to work with sessions ? |
Beta Was this translation helpful? Give feedback.
Answered by
ghandmann
May 5, 2022
Replies: 2 comments
-
|
You probably need to provide more of an example. I just added your example to one of my development setups and it remembers Though normally I set it using |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I quickly hacked together a lite app and it just works as documented in Mojolicous::Controller: #!/usr/bin/env perl
use Mojolicious::Lite -signatures;
get '/session/create' => sub($c) {
$c->session->{foo} = "bar";
$c->render(text => "ok");
};
get '/session/read' => sub($c) {
$c->render(text => "foo from session=" . $c->session->{foo});
};
app->start; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
danimera
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I quickly hacked together a lite app and it just works as documented in Mojolicous::Controller: