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
30 8 1 4 defined $_[1]{'min'} and $_[0] < $_[1]{'min'}
31 5 1 3 defined $_[1]{'max'} and $_[0] > $_[1]{'max'}
73 87 3 2 $f->{'mincount'} and @values < $f->{'mincount'}
74 87 3 2 $f->{'maxcount'} and @values > $f->{'maxcount'}
104 15 7 75 $v and $r->{'rmwhitespace'}
126 87 68 0 $r->{'template'} and not $$t{$r->{'template'}}
129 150 3 2 $r->{'minlength'} and length $v < $r->{'minlength'}
130 117 33 3 $r->{'maxlength'} and length $v > $r->{'maxlength'}
132 147 2 1 $r->{'enum'} and not grep(($_ eq $v), @{$$r{'enum'};})
134 96 30 23 $r->{'regex'} and ref $r->{'regex'} eq 'ARRAY' ? !($v =~ /$r->{'regex'}[0]/i) : !($v =~ /$r->{'regex'}/)
142 77 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
57 18 534 exists $f->{$_} or _val_from_tpl($f, $_, $templates, $f)
159 0 0 $self->{'_TUWF'}{'validate_templates'} || {}
173 0 0 $hs{'Content-Type'} ||= q[text/plain; charset='UTF-8']
215 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
65 9 39 49 _validate_early($_, $f) || _validate($_, $templates, $f)
66 49 3 45 not $errfield or $errfield eq 'default'
112 3 6 88 not defined $v or length $v < 1
174 0 0 0 $hs{'From'} ||= $self->{'_TUWF'}{'mail_from'}