Condition Coverage

blib/lib/PONAPI/Server.pm
Criterion Covered Total %
condition 70 96 72.9


and 3 conditions

line !l l&&!r l&&r condition
124 2 1 44 defined $type and $type =~ /$qr_member_name_prefix/
137 36 7 1 $def_rel_type and not $rel_type =~ /$qr_member_name_prefix/
142 28 2 2 $method eq 'POST' and $relationships
30 0 2 $method eq 'POST' and $relationships and $def_rel_type
143 8 2 22 $method eq 'GET' and not $relationships
10 1 21 $method eq 'GET' and not $relationships and not $def_rel_type
144 8 2 22 $method eq 'GET' and not $relationships
10 21 1 $method eq 'GET' and not $relationships and $def_rel_type
145 8 22 2 $method eq 'GET' and $relationships
30 0 2 $method eq 'GET' and $relationships and $def_rel_type
146 31 1 0 $method eq 'PATCH' and not $relationships
32 0 0 $method eq 'PATCH' and not $relationships and not $def_rel_type
147 31 0 1 $method eq 'PATCH' and $relationships
31 0 1 $method eq 'PATCH' and $relationships and $def_rel_type
148 29 1 2 $method eq 'DELETE' and not $relationships
30 0 2 $method eq 'DELETE' and not $relationships and not $def_rel_type
149 29 2 1 $method eq 'DELETE' and $relationships
31 0 1 $method eq 'DELETE' and $relationships and $def_rel_type
183 0 1 1 @jsonapi_accept and not grep({$_->params_are_empty;} @jsonapi_accept)
203 4 10 4 not defined $f and grep {$p eq $_;} 'page', 'fields', 'filter'
207 14 0 0 $p eq 'sort' and not $self->{'ponapi.sort_allowed'}
215 3 11 0 $p ne 'fields' and exists $query_params->{$k}
0 7 4 $p ne 'fields' and exists $query_params->{$k} and not @values
246 1 0 11 $body and ref $body eq 'HASH'
1 11 0 $body and ref $body eq 'HASH' and exists $body->{'data'}

or 2 conditions

line l !l condition
43 9 0 $self->{'ponapi.spec_version'} //= '1.0'
72 8 0 &Module::Runtime::use_module($self->{'repository.class'})->new(@{$$self{'repository.args'};}) || die("[PONAPI Server] failed to create a repository object\n")
299 50 0 $status || 200

or 3 conditions

line l !l&&r !l&&!r condition
39 2 79 9 $self->{$_} //= $conf{$_}
44 9 0 0 $self->{'ponapi.mediatype'} //= $default_media_type
250 0 10 1 not defined $data or ref($data) =~ /^(?:ARRAY|HASH)$/
286 0 0 1 !ref($r->{'relationships'}{$k}{$_}) eq 'HASH' or not exists $r->{'relationships'}{$k}{$_}{'type'}
290 1 0 0 not check_name($r->{'relationships'}{$k}{$_}{'type'}) or grep {not check_name($_);} keys %{$$r{'relationships'}{$k}{$_};}