Branch Coverage

blib/lib/MARC/File/USMARC.pm
Criterion Covered Total %
branch 40 60 66.6


line true false branch
52 11 146 if eof $fh
111 146 6 if (ref($self) =~ /^MARC::File/) { }
116 3 3 $self =~ /MARC::File/ ? :
124 3 149 unless $text =~ /^(\d{5})/
128 0 149 MARC::File::utf8_safe() ? :
131 0 149 unless $reclen == $realLength
134 0 149 unless substr($text, -1, 1) eq "\035"
140 0 149 0 + MARC::File::utf8_safe() ? :
148 1 148 unless substr($text, $data_start - 1, 1) eq "\036"
152 0 149 unless length($dir) % 12 == 0
162 0 2490 unless $tagno =~ /^[0-9A-Za-z]{3}$/
165 0 2490 unless $len =~ /^\d{4}$/
168 0 2490 unless $offset =~ /^\d{5}$/
171 0 2490 unless $offset + $len <= $reclen
174 0 2490 MARC::File::utf8_safe() ? :
178 0 2490 $len == MARC::File::utf8_safe() ? :
0 2490 unless $len == MARC::File::utf8_safe() ? MARC::File::Utils::byte_length($tagdata) : length $tagdata
183 2490 0 if (substr($tagdata, -1, 1) eq "\036") { }
191 0 2490 if $MARC::Record::DEBUG
194 167 2323 if ($filter_func)
195 154 13 unless &$filter_func($tagno, $tagdata)
199 506 1830 if ($tagno =~ /^\d+$/ and $tagno < 10) { }
206 0 1830 if (length $indicators > 2 or length $indicators == 0) { }
217 3050 0 if (length $_ > 0) { }
224 0 1830 unless (@subfield_data)
230 2 1828 if ($field->warnings)
271 0 8 if (ref $marc || $marc) =~ /^MARC::File/
272 0 8 unless ref $marc eq 'MARC::Record'
284 0 42 MARC::File::utf8_safe() ? :
319 1 7 if (ref $marc || $marc) =~ /^MARC::File/