Condition Coverage

blib/lib/PONAPI/Server.pm
Criterion Covered Total %
condition 71 97 73.2


and 3 conditions

line !l l&&!r l&&r condition
143 2 1 43 defined $type and $type =~ /$qr_member_name_prefix/
156 35 7 1 $def_rel_type and not $rel_type =~ /$qr_member_name_prefix/
161 27 2 2 $method eq 'POST' and $relationships
29 0 2 $method eq 'POST' and $relationships and $def_rel_type
162 8 2 21 _is_get_like($req) and not $relationships
10 1 20 _is_get_like($req) and not $relationships and not $def_rel_type
163 8 2 21 _is_get_like($req) and not $relationships
10 20 1 _is_get_like($req) and not $relationships and $def_rel_type
164 8 21 2 _is_get_like($req) and $relationships
29 0 2 _is_get_like($req) and $relationships and $def_rel_type
165 30 1 0 $method eq 'PATCH' and not $relationships
31 0 0 $method eq 'PATCH' and not $relationships and not $def_rel_type
166 30 0 1 $method eq 'PATCH' and $relationships
30 0 1 $method eq 'PATCH' and $relationships and $def_rel_type
167 28 1 2 $method eq 'DELETE' and not $relationships
29 0 2 $method eq 'DELETE' and not $relationships and not $def_rel_type
168 28 2 1 $method eq 'DELETE' and $relationships
30 0 1 $method eq 'DELETE' and $relationships and $def_rel_type
254 4 9 4 not defined $f and grep {$p eq $_;} 'page', 'fields', 'filter'
258 13 0 0 $p eq 'sort' and not $self->{'ponapi.sort_allowed'}
266 3 7 3 $p ne 'fields' and not @values
290 21 0 12 $req->content_length and $req->content_length > 0
297 1 0 11 $body and ref $body eq 'HASH'
1 0 11 $body and ref $body eq 'HASH' and exists $body->{'data'}
301 0 10 1 defined $data and not ref($data) =~ /^(?:ARRAY|HASH)$/
344 0 0 1 ref $relationship eq 'HASH' and exists $relationship->{'type'}

or 2 conditions

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

or 3 conditions

line l !l&&r !l&&!r condition
45 2 79 18 $self->{$_} //= $conf{$_}
50 9 0 0 $self->{'ponapi.mediatype'} //= $default_media_type
348 1 0 0 not check_name($relationship->{'type'}) or grep {not check_name($_);} keys %$relationship