Condition Coverage

blib/lib/TUWF/Misc.pm
Criterion Covered Total %
condition 43 53 81.1


and 3 conditions

line !l l&&!r l&&r condition
29 8 1 4 defined $_[1]{'min'} and $_[0] < $_[1]{'min'}
30 5 1 3 defined $_[1]{'max'} and $_[0] > $_[1]{'max'}
72 87 3 2 $f->{'mincount'} and @values < $f->{'mincount'}
73 87 3 2 $f->{'maxcount'} and @values > $f->{'maxcount'}
103 15 7 75 $v and $r->{'rmwhitespace'}
125 87 68 0 $r->{'template'} and not $$t{$r->{'template'}}
128 150 3 2 $r->{'minlength'} and length $v < $r->{'minlength'}
129 117 33 3 $r->{'maxlength'} and length $v > $r->{'maxlength'}
131 147 2 1 $r->{'enum'} and not grep(($_ eq $v), @{$$r{"enum"};})
133 96 28 25 $r->{'regex'} and ref $r->{'regex'} eq "ARRAY" ? !($v =~ /$r->{'regex'}[0]/i) : !($v =~ /$r->{'regex'}/)
141 73 9 10 $r->{'func'} and ref $r->{'func'} eq "ARRAY" ? !$r->{'func'}[0]->($_[0], $r) : !$r->{'func'}->($_[0], $r)

or 2 conditions

line l !l condition
56 18 534 exists $f->{$_} or _val_from_tpl($f, $_, $templates, $f)
158 0 0 $self->{'_TUWF'}{'validate_templates'} || {}
172 0 0 $hs{'Content-Type'} ||= "text/plain; charset='UTF-8'"
214 0 0 $self->{'_TUWF'}{'Req'}{'PARAM'} ||= {map({my(@v) = $self->reqParams($_); $_, @v > 1 ? \@v : $v[0];} $self->reqParams)}

or 3 conditions

line l !l&&r !l&&!r condition
64 9 41 47 _validate_early($_, $f) || _validate($_, $templates, $f)
65 47 3 47 not $errfield or $errfield eq "default"
111 3 6 88 not defined $v or length $v < 1
173 0 0 0 $hs{'From'} ||= $self->{'_TUWF'}{'mail_from'}