Branch Coverage

blib/lib/CatalystX/CRUD/Controller.pm
Criterion Covered Total %
branch 46 112 41.0


line true false branch
156 0 35 if (scalar(@pk) % 2)
164 1 34 unless (defined $val and length $val)
169 0 35 if ($c->debug and defined $pk_is_null)
172 1 34 defined $pk_is_null || !$id ? :
173 0 35 if $c->debug
177 12 22 if ($self->has_errors($c) or not $c->stash->{"object"})
218 0 0 if ($form->can("field_value"))
220 0 0 if $c->debug
221 0 0 if (exists $c->req->params->{$field})
222 0 0 if $c->debug
224 0 0 if ($obj->can($field))
225 0 0 if $c->debug
251 0 0 if $self->has_errors($c)
252 0 0 unless ($self->can_read($c))
275 0 12 if $self->has_errors($c)
276 0 12 unless ($self->can_read($c))
317 0 9 if ($c->request->params->{"_delete"} or exists $c->request->params->{"x-tunneled-method"} and $c->request->params->{"x-tunneled-method"} eq "DELETE")
327 0 9 if $self->has_errors($c)
328 0 9 unless ($self->can_write($c))
335 0 9 unless ($obj)
336 0 0 if $c->debug
341 0 9 unless ($self->precommit($c, $obj))
375 0 7 if $self->has_errors($c)
376 0 7 unless ($self->can_write($c))
383 0 7 unless ($self->precommit($c, $o))
386 2 5 if ($self->model_adapter) { }
418 0 4 unless ($self->can_read($c))
436 0 8 unless ($self->can_read($c))
456 0 0 unless ($self->can_read($c))
486 0 6 if $self->has_errors($c)
487 0 6 unless ($self->can_write($c))
515 22 0 if (not $self->allow_GET_writes)
516 0 22 if (uc $c->req->method eq "GET")
531 0 3 if $self->has_errors($c)
563 0 3 if $self->has_errors($c)
581 0 0 if $self->has_errors($c)
601 0 0 unless ($self->can_read($c))
605 0 0 if $self->has_errors($c)
631 0 0 unless ($self->can_read($c))
635 0 0 if $self->has_errors($c)
676 0 0 if ($self->{'_form'}->can('clear')) { }
0 0 elsif ($self->{'_form'}->can('reset')) { }
749 9 0 $c->stash->{'object_id'} ? :
750 3 6 if ($self->model_adapter) { }
779 10 6 unless (defined $c->res->location and length $c->res->location)
782 2 8 if ($c->action->name eq 'rm') { }
805 0 1 unless $self->view_on_single_result
851 1 10 if (not @arg || $c->req->param and $c->action->name eq "search")
857 10 0 unless exists $c->stash->{'view_on_single_result'}
860 0 10 if ($self->can('make_query')) { }
10 0 elsif ($self->model_can($c, 'make_query')) { }
872 10 0 unless ($c->stash->{'fetch_no_results'})
876 0 10 if ($results and $count == 1 and $c->stash->{'view_on_single_result'} and my $uri = $self->uri_for_view_on_single_result($c, $results)) { }
882 0 0 if $c->debug
888 0 10 if ($count and $self->model_can($c, "make_pager"))
893 0 10 $self->naked_results ? :