blib/lib/auto/share/dist/Amon2/flavor/Basic/lib/__PATH__/Web/Dispatcher.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package <% $module %>::Web::Dispatcher;
2 use strict;
3 use warnings;
4 use utf8;
5 use Amon2::Web::Dispatcher::RouterBoom;
6  
7 any '/' => sub {
8 my ($c) = @_;
9 my $counter = $c->session->get('counter') || 0;
10 $counter++;
11 $c->session->set('counter' => $counter);
12 return $c->render('index.tx', {
13 counter => $counter,
14 });
15 };
16  
17 post '/reset_counter' => sub {
18 my $c = shift;
19 $c->session->remove('counter');
20 return $c->redirect('/');
21 };
22  
23 post '/account/logout' => sub {
24 my ($c) = @_;
25 $c->session->expire();
26 return $c->redirect('/');
27 };
28  
29 1;