Branch Coverage

blib/lib/HTML/MobileConverter.pm
Criterion Covered Total %
branch 35 50 70.0


line true false branch
21 0 1 unless $$self{'baseuri'}
97 1 8 if ($tag =~ /^($$self{'codetag'})$/i)
100 7 2 if (defined $$self{'mobiletag'}{$tag})
102 0 7 if ($tag =~ /^($$self{'ignoretag'})$/i) { }
114 0 8 unless my $tag = shift()
115 0 8 unless my $attr = shift()
116 1 7 if ($tag eq 'img')
118 0 0 unless ($w and $h and $w < 100 and $h < 100)
127 3 1 if ($key =~ /^(href|action)$/) { }
0 1 elsif ($key eq 'src') { }
0 1 elsif ($key =~ /^($attrpat)$/i) { }
142 0 8 unless my $tag = shift()
143 0 8 unless my $attr = shift()
146 3 4 if ($key =~ /^(href|action)$/) { }
1 3 elsif ($key eq 'src') { }
163 1 8 if ($tag =~ /^($$self{'codetag'})$/i)
166 7 2 if (defined $$self{'mobiletag'}{$tag})
167 0 7 if ($tag =~ /^($$self{'ignoretag'})$/i) { }
181 10 1 unless ($$self{'iscode'})
195 0 2 unless $$self{'html'} = shift()
198 1 1 if ($self->_checkmobile) { }
207 0 3 if ($$self{'maxlength'} and length $$self{'html'} > $$self{'maxlength'}) { }
0 3 elsif ($$self{'tagcount'} - $$self{'mtagcount'} > $$self{'maxpctagcount'}) { }
0 3 elsif (not $$self{'tagcount'}) { }
2 1 elsif ($$self{'mtagcount'} / $$self{'tagcount'} < 1 - $$self{'maxpctagrate'}) { }