Branch Coverage

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


line true false branch
23 507 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 308 if (exists $captures->{$name} and not $self->app->routes->is_reserved($name))
59 5 79 ref $value eq 'ARRAY' ? :
65 9 299 @$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 86 887 @_ % 2 ? :
130 86 887 if $template
137 58 915 if exists $stash->{'layout'}
138 2 971 if exists $stash->{'extends'}
141 573 400 if $ts or $maybe
142 26 947 if $ts
150 25 0 defined $output ? :
25 928 if $ts
151 186 3 $maybe ? :
189 739 unless defined $output
167 257 784 if $status
171 944 97 if (not $stash->{'mojo.finished'} and ++$stash->{'mojo.finished'})
173 610 112 unless $status or $res->code
184 872 72 unless $stash->{'mojo.static'}
199 1 92 unless $tx->is_websocket
200 2 90 $cb ? :
201 75 17 $tx->established ? :
208 195 42 unless exists $stash->{'mojo.active_session'}
212 198 39 unless @_
215 18 21 unless @_ > 1 or ref $_[0]
218 0 21 ref $_[0] ? :
228 241 68 unless defined $value
241 20 619 if &Scalar::Util::blessed($target) and $target->isa("Mojo::URL")
242 18 601 if $target =~ m[^(?:[^:/?#]+:|//|#)]u
251 437 164 if ($target =~ m[^/]u) { }
252 30 407 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'}
287 4 17 $cb ? :
293 37 24 $cb ? :