Hello,
I'm starting to learn Dancer web framework. One of the first things I'm testing is sessions. The sessions are created in the session folder, but every time I access to the web page, It creates a new one and the visits number doesn't increase.
My code is:
get '/usuario' => sub { my $number_visits; if ( not session('visits') ) { session visits => 1; $number_visits = 1; } else { $number_visits = int ( session('visits') ) + 1; session visits => $number_visits; } template 'user_get' => { num_of_visits => $number_visits, }; };
Can you see what I'm doing wrong?
Thank you
In reply to Dancer Sessions by fontardion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |