Branch Coverage

blib/lib/HTML/Encoding.pm
Criterion Covered Total %
branch 23 168 13.6


line true false branch
60 0 0 unless $@
75 0 0 unless $@
87 0 0 if defined $seq
101 0 0 if exists $CHARACTER_MAP_CACHE{$encoding}
117 0 0 unless defined $text
118 0 0 unless length $text
120 0 0 unless defined $enco
121 0 0 unless length $enco
142 0 0 if $_[1] eq 'head'
148 0 0 if $i > $leng
159 0 0 unless defined $hash{'content'}
160 0 0 unless exists $hash{'http-equiv'}
161 0 0 unless lc $hash{'http-equiv'} eq 'content-type'
163 0 0 if defined $char and length $char
166 0 0 unless @resu
167 0 0 wantarray ? :
177 0 0 unless defined $text
178 0 0 unless length $text
191 0 0 unless $end > 0 and $str >= 0 and $end > $str
200 0 0 unless defined $deco
206 0 0 unless keys %resu
213 0 0 wantarray ? :
223 0 0 unless defined $text
224 0 0 unless length $text
231 0 0 unless $i >= 0
244 0 0 unless length $t
248 0 0 unless keys %resu
255 0 0 wantarray ? :
262 0 0 unless defined $decl
263 0 0 unless length $decl
269 0 0 unless $decl =~ /^<\?xml$ws/i
272 0 0 unless $decl =~ /encoding$ws=$ws'([^']+)'/i or $decl =~ /encoding$ws=$ws"([^"]+)"/i
276 0 0 unless defined $1
286 0 0 unless length $enco
298 0 0 unless defined $text
299 0 0 unless length $text
307 0 0 unless defined $bom
310 0 0 if $text =~ /^(\Q$bom\E)/
314 0 0 unless keys %resu
321 0 0 wantarray ? :
329 1 41 unless defined $text and length $text
332 0 41 if &Encode::is_utf8($text)
340 39 25 if 'charset' eq lc $param
344 2 39 unless defined $char
356 0 39 unless length $char
368 0 0 unless defined $text
369 0 0 unless length $text
374 0 0 wantarray ? :
0 0 if @boms
381 0 0 if defined $enco and length $enco
384 0 0 unless keys %resu
389 0 0 wantarray ? :
398 2 0 exists $o{'xhtml'} ? :
400 0 2 unless defined $text
401 2 0 unless length $text
403 0 0 if ($xhtml) { }
405 0 0 wantarray ? :
411 0 0 wantarray ? :
0 0 if @xml and defined $xml[0]
419 0 0 wantarray ? :
0 0 if @boms
429 0 0 unless @first
436 0 0 unless @resu
437 0 0 wantarray ? :
453 0 42 exists $o{'xhtml'} ? :
454 0 42 exists $o{'default'} ? :
459 0 42 if ($mess->content_type =~ /$is_xml/)
461 0 0 wantarray ? :
0 0 if defined $charset
465 0 0 wantarray ? :
0 0 if defined $txml and $mess->content_type =~ /$is_t_xml/
468 0 0 if (wantarray) { }
471 0 0 if @xml
476 0 0 if defined $xml
479 0 0 wantarray ? :
0 0 if defined $default
482 41 1 if ($mess->content_type =~ /$is_html/)
484 0 39 wantarray ? :
39 2 if defined $charset
487 0 2 if (wantarray) { }
490 0 0 if @html
495 0 2 if defined $html
498 0 2 wantarray ? :
2 0 if defined $default