Branch Coverage

blib/lib/Catmandu/Importer/HOCR.pm
Criterion Covered Total %
branch 20 26 76.9


line true false branch
20 0 2 unless my $reader = 'XML::LibXML::Reader'->new('IO', $self->fh, 'validation', 0, 'load_ext_dtd', 0)
33 5 5 if ($key eq 'bbox') { }
0 5 elsif ($key eq 'x_wconf') { }
64 10 0 if ($idx >= 0) { }
97 0 89 unless my $state = $_[0]->reader->read
98 0 89 if $state < 0
118 2 87 if ($nodeType == $start_element and defined $class and $class eq 'ocr_page') { }
3 84 elsif ($nodeType == $start_element and defined $class and $class eq 'ocr_line') { }
16 68 elsif ($nodeType == $start_element and defined $class and $class eq 'ocr_word' || $class eq 'ocrx_word') { }
3 112 elsif (defined $line and $nodeType == $end_element) { }
156 16 30 if ($reader->nodeType == 3) { }
16 21 elsif ($reader->nodeType == $end_element and $reader->localName eq 'span') { }
168 3 0 if ($line)