Condition Coverage

blib/lib/FU/Validate.pm
Criterion Covered Total %
condition 131 159 82.3


and 3 conditions

line !l l&&!r l&&r condition
38 2 6 39 (!defined($min) || $got >= $min) && (!defined($max) || $got <= $max)
121 0 160 1 $name eq "type" and not $type_vals{$val}
122 125 33 2 $top->{'type'} and $top->{'type'} ne $val
129 40 34 0 $top->{'type'} and $top->{'type'} ne $type
155 30 0 1 ref $val eq "SCALAR" and $$val eq "required"
165 45 24 0 $name eq "missing" and not $missing_vals{$val}
166 54 15 0 $name eq "unknown" and not $unknown_vals{$val}
167 63 0 6 $name eq "accept_array" and $val
63 5 1 $name eq "accept_array" and $val and $val ne "first"
5 1 0 $name eq "accept_array" and $val and $val ne "first" and $val ne "last"
168 64 1 4 $name eq "sort" and ref $val ne "CODE"
173 342 0 2 $iscompiled and $name eq "validations"
205 4 3 8 $s->{'missing'} and $s->{'missing'} eq "ignore"
206 4 1 2 $s->{'missing'} and $s->{'missing'} eq "reject"
260 8 2 56 $r->{'validation'} eq 'func' && (!exists $r->{'result'} || keys %$r > 2)
272 17 2 4 $c->{'unique'} and !$c->{'sort'} || ref $c->{'unique'} eq 'CODE'
297 218 0 6 $c->{'accept_array'} and ref $_[1] eq "ARRAY"
300 17 63 144 defined $_[1] and not ref $_[1]
80 7 137 defined $_[1] and not ref $_[1] and $type eq "scalar"
304 1 135 1 not $c->{'allow_control'} and &has_control($_[1])
308 63 134 9 not ref $_[1] and $_[1] eq ""
325 10 4 7 $c->{'unknown'} and $c->{'unknown'} eq "pass"
336 26 0 1 $c->{'accept_scalar'} and not ref $_[1]
345 100 20 3 $type eq "array" and &_validate_array
165 22 4 $type eq "hash" and &_validate_hash
176 6 1 $c->{'elems'} and &_validate_elems
355 132 88 4 $r and exists $c->{'onerror'}
373 4 0 1 $c->{'type'} eq "array" and $c->{'elems'}
0 0 1 $c->{'type'} eq "array" and $c->{'elems'} and ref $_[1] eq "ARRAY"
1 0 3 $c->{'type'} eq "hash" and $c->{'keys'}
0 1 2 $c->{'type'} eq "hash" and $c->{'keys'} and ref $_[1] eq "HASH"
384 1 0 1 $opt{'unknown'} and $opt{'unknown'} ne "pass"
394 0 7 2 $c->{'type'} and $c->{'type'} eq "array"
395 0 6 1 $c->{'type'} and $c->{'type'} eq "hash"
396 0 4 2 $c->{'type'} and $c->{'type'} eq "any"

or 2 conditions

line l !l condition
140 6 25 $top->{'keys'} ||= {}
160 5 48 $top->{'_scalartype'} || 0
207 0 5 $s->{'default'} // undef
293 162 62 $c->{'type'} // "scalar"
320 1 2 lc ref $_[1] || 'scalar'
337 0 1 lc ref $_[1] || 'scalar'

or 3 conditions

line l !l&&r !l&&!r condition
133 8 2 754 $name eq "elems" or $name eq "values"
134 1 9 0 $top->{$name} ||= _new()
142 2 53 0 $top->{'keys'}{$n} ||= _new()
168 4 0 0 $sort_vals{$val} || confess("Unknown value for 'sort': $val")
178 166 174 2 $custom->{$name} || $default_validations{$name}
272 4 0 2 !$c->{'sort'} || ref $c->{'unique'} eq 'CODE'
302 132 1 4 not exists $c->{'trim'} or $c->{'trim'}
308 17 10 196 not defined $_[1] or not ref $_[1] and $_[1] eq ""
325 6 7 14 not $c->{'keys'} or $c->{'unknown'} and $c->{'unknown'} eq "pass"
10 2 2 not $c->{'unknown'} or $c->{'unknown'} eq "remove"
345 8 1 182 $type eq "hash" and &_validate_hash or $c->{'elems'} and &_validate_elems
2 58 123 $type eq "hash" and &_validate_hash or $c->{'elems'} and &_validate_elems or &_validate_rec
373 1 0 5 not $c->{'type'} or $c->{'type'} eq "scalar"
382 1 0 1 $opt{'unknown'} ||= $c->{'unknown'}