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
128 2 1 44 defined $type and $type =~ /$qr_member_name_prefix/
141 36 7 1 $def_rel_type and not $rel_type =~ /$qr_member_name_prefix/
146 28 2 2 $method eq 'POST' and $relationships
30 0 2 $method eq 'POST' and $relationships and $def_rel_type
147 8 2 22 $method eq 'GET' and not $relationships
10 1 21 $method eq 'GET' and not $relationships and not $def_rel_type
148 8 2 22 $method eq 'GET' and not $relationships
10 21 1 $method eq 'GET' and not $relationships and $def_rel_type
149 8 22 2 $method eq 'GET' and $relationships
30 0 2 $method eq 'GET' and $relationships and $def_rel_type
150 31 1 0 $method eq 'PATCH' and not $relationships
32 0 0 $method eq 'PATCH' and not $relationships and not $def_rel_type
151 31 0 1 $method eq 'PATCH' and $relationships
31 0 1 $method eq 'PATCH' and $relationships and $def_rel_type
152 29 1 2 $method eq 'DELETE' and not $relationships
30 0 2 $method eq 'DELETE' and not $relationships and not $def_rel_type
153 29 2 1 $method eq 'DELETE' and $relationships
31 0 1 $method eq 'DELETE' and $relationships and $def_rel_type
187 0 1 1 @jsonapi_accept and not grep({$_->params_are_empty;} @jsonapi_accept)
209 4 10 4 not defined $f and grep {$p eq $_;} 'page', 'fields', 'filter'
213 14 0 0 $p eq 'sort' and not $self->{'ponapi.sort_allowed'}
222 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
253 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
47 9 0 $self->{'ponapi.spec_version'} //= '1.0'
76 8 0 &Module::Runtime::use_module($self->{'repository.class'})->new(@{$$self{'repository.args'};}) || die("[PONAPI Server] failed to create a repository object\n")
306 50 0 $status || 200

or 3 conditions

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