Branch Coverage

blib/lib/Mojolicious/Plugin/Loco.pm
Criterion Covered Total %
branch 18 64 28.1


line true false branch
33 0 0 unless @_
36 0 0 unless @_ > 1 or ref $_[0]
39 0 0 ref $_[0] ? :
41 0 0 unless $_settable{$_}
51 0 0 @_ % 2 ? :
63 0 0 if '400' eq ($c->res->code // '')
64 0 0 if $c->validation->csrf_protect->error('csrf_token')
72 0 0 if '400' eq ($c->res->code // '')
73 0 0 unless $c->loco->id
81 0 0 if $c->loco->csrf_fail
82 0 0 unless $c->res->code
95 5 6 if $conf{'browser_launched'}++
105 0 6 unless $url->port or $_test
113 2 2 do { ref $cmd eq 'CODE' } ? :
4 2 $cmd ? :
114 1 1 unless defined $cmd
122 2 0 if ($_test)
126 0 0 if ($^O eq 'MSWin32') { }
127 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")
135 0 0 unless ($pid = fork)
136 0 0 unless (fork)
153 8 5 if $conf{'seed'} or not $c->session->{'loco.id'}
155 6 0 unless $conf{'allow_other_sessions'}
161 3 0 if @_
171 3 0 if (length $seed >= 40 and $seed eq ($conf{'seed'} // ''))
185 0 0 if ($c->validation->csrf_protect->error('csrf_token'))
212 0 0 ref $_[-1] eq 'CODE' ? :
237 0 0 length $jquery ? :
250 0 2 if defined $timer
252 1 1 unless my $wait = shift()