Branch Coverage

blib/lib/Mojolicious/Plugin/Loco.pm
Criterion Covered Total %
branch 20 66 30.3


line true false branch
22 6 0 if (my $loco = $conf->{'config_key'})
23 0 6 if (my $ac = $app->config($loco)) { }
42 0 0 unless @_
45 0 0 unless @_ > 1 or ref $_[0]
48 0 0 ref $_[0] ? :
57 0 0 @_ % 2 ? :
69 0 0 if '400' eq ($c->res->code // '')
70 0 0 if $c->validation->csrf_protect->error('csrf_token')
78 0 0 if '400' eq ($c->res->code // '')
79 0 0 unless $c->loco->id
87 0 0 if $c->loco->csrf_fail
88 0 0 unless $c->res->code
101 5 6 if $conf->{'browser_launched'}++
111 0 6 unless $url->port or $_test
119 2 2 do { ref $cmd eq 'CODE' } ? :
4 2 $cmd ? :
120 1 1 unless defined $cmd
128 2 0 if ($_test)
132 0 0 if ($^O eq 'MSWin32') { }
133 0 0 $cmd eq 'start' ? :
0 0 $cmd =~ /^microsoft-edge/ ? :
0 0 if system 'start', $cmd =~ /^microsoft-edge/ ? "microsoft-edge:$url" : ($cmd eq 'start' ? () : $cmd, "$url")
141 0 0 unless ($pid = fork)
142 0 0 unless (fork)
159 8 5 if $conf->{'seed'} or not $c->session->{'loco.id'}
161 6 0 unless $conf->{'allow_other_sessions'}
167 3 0 if @_
177 3 0 if (length $seed >= 40 and $seed eq ($conf->{'seed'} // ''))
191 0 0 if ($c->validation->csrf_protect->error('csrf_token'))
218 0 0 ref $_[-1] eq 'CODE' ? :
243 0 0 length $jquery ? :
256 0 2 if defined $timer
258 1 1 unless my $wait = shift()