Branch Coverage

blib/lib/Terse/Controller.pm
Criterion Covered Total %
branch 11 102 10.7


line true false branch
23 1 0 if $self->can("build_controller")
29 0 0 unless ($req)
34 0 0 if (scalar @captured)
45 0 0 if ($self->models)
49 0 0 unless $self->models->{$model}
53 0 0 if ($self->controllers)
56 0 0 if $self->controllers->{$controller}
58 0 0 if $self->controllers->{'_alias'}{$controller}
61 0 0 if (scalar @captured)
70 0 0 if ($self->views)
73 0 0 unless $self->views->{$view}
77 0 0 if ($self->plugins)
81 0 0 unless $self->plugins->{$plugin}
84 0 0 $self->plugins->{$plugin}->can('connect') ? :
96 2 5 if ($attr{'path'})
120 1 12 if ($attribute =~ /^\s*params\((.*)\)\s*$/) { }
7 5 elsif ($attribute =~ /^\s*([^\s\(]+)\s*\(([\s\'\"]*?)(.*)([\s\'\"]*?)\)/) { }
126 3 4 if ($HTTP{$k} or $k =~ /^(any|websocket|deleayed)$/i)
134 1 6 if $attr{'websocket'} and scalar keys %attr < 4
150 0 0 if ($@ or $t->response->error) { }
0 0 elsif ($response) { }
153 0 0 if push @{$res;}, [$t->response->serialize]
158 0 0 if ($view) { }
160 0 0 if ($t->response->error)
162 0 0 $t->response->no_response ? :
181 0 0 if $res
182 0 0 $self->views && $self->views->{$t->response_view or $self->response_view} ? :
194 0 0 unless $dispatch->{$req}
201 0 0 unless $dispatch and $dispatch->{$req}
206 0 0 unless (scalar @dispatcher)
212 0 0 unless $t->captured
214 0 0 unless $$candidate{lc $t->request->method} or $candidate->{'any'}
215 0 0 unless not $candidate->{'captured'} or $caps == $candidate->{'captured'}
216 0 0 if ($candidate->{'params'})
218 0 0 unless $t->params->{$param}
221 0 0 unless $self->_partial_match($t->params->{$param}, $candidate->{'params'}{$param})
225 0 0 if $candidate->{'path'}
230 0 0 if $self->can("dispatch_hook")
232 0 0 unless ($callback)
237 0 0 unless $callback =~ /auth/
238 0 0 if $dispatch->{'view'}
239 0 0 if $dispatch->{'content_type'}
240 0 0 if ($dispatch->{'delayed'}) { }
0 0 elsif ($dispatch->{'websocket'}) { }
252 0 0 if not $param and $spec
254 0 0 if (not $ref) { }
0 0 elsif ($ref eq 'ARRAY') { }
0 0 elsif ($ref eq 'HASH') { }
255 0 0 ref $param ? :
259 0 0 unless $match
264 0 0 unless $match