Branch Coverage

blib/lib/HTML/Scrubber.pm
Criterion Covered Total %
branch 100 112 89.2


line true false branch
52 13 10 unless @_
57 48 12 unless exists $args{$f}
58 10 2 if (ref $args{$f}) { }
72 9 7 if @_ == 1
80 9 1 if @_ == 1
88 2 1 if @_ == 1
96 2 1 if @_ == 1
140 7 12 if @_ == 1
143 10 2 if defined $_[1]
144 6 6 if defined $_[2] and ref $_[2]
152 2 0 if (@_ > 2) { }
153 0 2 unless defined $_[0]->_out($_[2])
163 0 2 unless exists $_[0]{'_out'}
164 0 2 if length $_[0]{'_r'}
171 2 61 if (@_ > 2) { }
172 0 2 unless defined $_[0]->_out($_[2])
180 62 1 if defined $_[1]
183 61 2 unless exists $_[0]{'_out'}
192 2 2 if (ref $o and ref \$o ne 'GLOB') { }
193 0 2 unless open my $F, '>', $o
209 50 41 unless %$a
215 37 8 exists $r->{'*'} ? :
16 45 exists $r->{$k} ? :
217 4 49 if (ref $check eq 'CODE') { }
0 49 elsif (ref $check or length $check > 1) { }
47 2 elsif ($check) { }
219 1 3 unless @v
223 0 0 if $a->{$k} =~ /$check/
230 31 10 if (%f)
235 40 10 defined $f{$_} ? :
237 54 1 if exists $f{$_}
31 0 if $r = join(' ', map({defined $f{$_} ? qq[$_="] . encode_entities($f{$_}) . '"' : $_;} grep({not $seen{$_}++ if exists $f{$_};} @$as)))
250 109 395 if ($e eq 'start') { }
79 316 elsif ($e eq 'end') { }
14 302 elsif ($e eq 'comment') { }
10 292 elsif ($e eq 'process') { }
162 130 elsif ($e eq 'text' or $e eq 'default') { }
65 65 elsif ($e eq 'start_document') { }
251 61 48 if (exists $s->{'_rules'}{$t}) { }
30 18 elsif ($s->{'_rules'}{'*'}) { }
253 5 56 if (ref $s->{'_rules'}{$t}) { }
56 0 elsif ($s->{'_rules'}{$t}) { }
272 16 63 if $text ne '' and &any(sub { $t eq $_; } , @empty_tags)
275 27 36 if (exists $s->{'_rules'}{$t}) { }
23 13 elsif ($s->{'_rules'}{'*'}) { }
276 27 0 if $s->{'_rules'}{$t}
281 50 13 if ($place)
282 46 4 if (length $text) { }
291 6 8 if ($s->{'_comment'})
294 5 1 if $text =~ /^$/ms
298 2 8 if $s->{'_process'}
316 12 26 if length $self->{'_r'}
332 39 26 unless $self->{'_optimize'}
337 8 18 if ($self->{'_rules'}{'*'}) { }
349 11 7 if @reports
359 2 24 if @ignores