Branch Coverage

blib/lib/Mojolicious/Controller.pm
Criterion Covered Total %
branch 93 98 94.9


line true false branch
23 503 0 if $dynamic
35 114 34 if (@_)
39 0 114 if length $cookie->{'value'} > 4096
46 13 21 unless my $cookie = $self->req->cookie($name)
57 84 304 if (exists $captures->{$name} and not $self->app->routes->is_reserved($name))
59 5 79 ref $value eq 'ARRAY' ? :
65 9 295 @$uploads ? :
76 57 9 if ($value =~ s/--([^\-]+)$//u) { }
82 45 20 if Mojo::Util::secure_compare($signature, $check)
84 45 12 if ($valid) { }
100 7 2 $tx->established ? :
9 9 if $tx->is_websocket
103 4 2 @_ ? :
6 3 if $tx->res->content->is_chunked
106 2 1 @_ ? :
114 75 18 if $tx->is_websocket and not $tx->established
120 234 27 unless @_
121 2 25 @_ > 1 ? :
129 82 876 @_ % 2 ? :
130 82 876 if $template
137 58 900 if exists $stash->{'layout'}
138 2 956 if exists $stash->{'extends'}
141 558 400 if $ts or $maybe
142 26 932 if $ts
150 25 0 defined $output ? :
25 913 if $ts
151 178 3 $maybe ? :
181 732 unless defined $output
167 253 776 if $status
171 932 97 if (not $stash->{'mojo.finished'} and ++$stash->{'mojo.finished'})
173 607 107 unless $status or $res->code
184 865 67 unless $stash->{'mojo.static'}
199 1 92 unless $tx->is_websocket
200 2 90 $cb ? :
201 75 17 $tx->established ? :
208 187 42 unless exists $stash->{'mojo.active_session'}
212 190 39 unless @_
215 18 21 unless @_ > 1 or ref $_[0]
218 0 21 ref $_[0] ? :
228 233 68 unless defined $value
241 26 550 if &Scalar::Util::blessed($target) and $target->isa("Mojo::URL")
242 46 504 if $target =~ m[^(?:[^:/?#]+:|//|#)]u
251 340 164 if ($target =~ m[^/]u) { }
252 26 314 if (defined(my $prefix = $self->stash->{'path'}))
263 156 8 if $generated->{'path'}
264 0 10 $base->protocol eq 'https' ? :
10 154 if $generated->{'websocket'}
282 4 17 $cb ? :
288 37 24 $cb ? :