Condition Coverage

blib/lib/Catmandu/MARC.pm
Criterion Covered Total %
condition 83 205 40.4


and 3 conditions

line !l l&&!r l&&r condition
33 0 0 624 defined $record and ref $record eq 'ARRAY'
54 125 238 4760 $context->{'is_regex_field'} == 0 and $$field[0] ne $context->{'field'}
363 0 0 defined $context->{'ind1'} and !defined($$field[1]) || $$field[1] ne $context->{'ind1'}
363 0 0 defined $context->{'ind2'} and !defined($$field[2]) || $$field[2] ne $context->{'ind2'}
238 125 0 $context->{'is_regex_field'} == 1 and not $$field[0] =~ /$context->{'field_regex'}/
118 0 11 24 defined $v and ref $v eq 'ARRAY'
119 30 0 5 defined $vals and ref $vals eq 'ARRAY'
145 594 0 30 $split and defined $vals
184 0 0 11 Catmandu::Util::is_value($value) and length $value > 0
411 0 113 7 $context->{'is_regex_field'} == 0 and $$field[0] eq $context->{'field'}
113 0 0 $context->{'is_regex_field'} == 1 and $$field[0] =~ /$context->{'field_regex'}/
419 6 0 1 defined $context->{'ind1'} and defined $context->{'ind2'}
421 0 1 0 defined $$field[1] and $$field[1] eq $context->{'ind1'}
1 0 0 defined $$field[1] and $$field[1] eq $context->{'ind1'} and defined $$field[2]
1 0 0 defined $$field[1] and $$field[1] eq $context->{'ind1'} and defined $$field[2] and $$field[2] eq $context->{'ind2'}
424 0 0 0 defined $$field[1] and $$field[1] eq $context->{'ind1'}
427 0 0 1 defined $$field[2] and $$field[2] eq $context->{'ind2'}
433 1 2 4 $ind_match and not defined $context->{'subfield_regex'}
579 78 0 36 $prev_tag eq $current_tag && defined $tag_index
585 0 19 2 defined $$field[1] and $$field[1] =~ /$indicator1/
590 0 14 8 defined $$field[2] and $$field[2] =~ /$indicator2/
609 34 0 12 $invert and not $sf->has_subspecs
610 6 0 6 -1 == $sf->index_length and not $sf->has_char_start
636 5 0 0 $referred and $value_set
760 0 0 7 '!' ne $subspec->operator and '?' ne $subspec->operator
1056 0 0 0 defined $record and ref $record eq 'ARRAY'
1066 0 0 0 $context->{'is_regex_field'} == 0 and $tag ne $context->{'field'}
0 0 0 $context->{'is_regex_field'} == 1 and not $tag =~ /$context->{'field_regex'}/
1180 0 0 0 Catmandu::Util::is_hash_ref($part) and exists $part->{'tag'}
0 0 0 Catmandu::Util::is_hash_ref($part) and exists $part->{'tag'} and exists $part->{'ind1'}
0 0 0 Catmandu::Util::is_hash_ref($part) and exists $part->{'tag'} and exists $part->{'ind1'} and exists $part->{'ind2'}
0 0 0 Catmandu::Util::is_hash_ref($part) and exists $part->{'tag'} and exists $part->{'ind1'} and exists $part->{'ind2'} and exists $part->{'content'} || exists $part->{'subfields'}
1188 0 0 0 defined $subfields and Catmandu::Util::is_array_ref($subfields)

or 2 conditions

line l !l condition
36 624 0 $_[3]{'-split'} // 0
37 624 0 $_[3]{'-join'} // ''
38 624 0 $_[3]{'-pluck'} // 0
39 64 560 $_[3]{'-value'} // undef
40 624 0 $_[3]{'-nested_arrays'} // 0
41 601 23 $_[3]{'-force_array'} // undef
79 30 3 $_h->{$c} // [undef]
165 9 1 $data->{'record'} // []
170 3 7 $subfields{'ind1'} // ' '
171 3 7 $subfields{'ind2'} // ' '
478 47 0 $_[3]{'-split'} // 0
480 40 7 $_[3]{'-pluck'} // 0
481 2 45 $_[3]{'-value'} // undef
482 40 7 $_[3]{'-invert'} // 0
483 40 7 $_[3]{'-nested_arrays'} // 0
484 40 7 $_[3]{'-force_array'} // 0
878 1 1 $data->{'fields'} ||= []
886 3 0 $data->{'fields'} ||= []
1183 0 0 $part->{'ind1'} // ' '
1184 0 0 $part->{'ind2'} // ' '

or 3 conditions

line l !l&&r !l&&!r condition
54 0 0 0 !defined($$field[1]) || $$field[1] ne $context->{'ind1'}
4760 0 363 $context->{'is_regex_field'} == 0 and $$field[0] ne $context->{'field'} or defined $context->{'ind1'} and !defined($$field[1]) || $$field[1] ne $context->{'ind1'}
0 0 0 !defined($$field[2]) || $$field[2] ne $context->{'ind2'}
0 0 363 $context->{'is_regex_field'} == 0 and $$field[0] ne $context->{'field'} or defined $context->{'ind1'} and !defined($$field[1]) || $$field[1] ne $context->{'ind1'} or defined $context->{'ind2'} and !defined($$field[2]) || $$field[2] ne $context->{'ind2'}
0 0 363 $context->{'is_regex_field'} == 0 and $$field[0] ne $context->{'field'} or defined $context->{'ind1'} and !defined($$field[1]) || $$field[1] ne $context->{'ind1'} or defined $context->{'ind2'} and !defined($$field[2]) || $$field[2] ne $context->{'ind2'} or $context->{'is_regex_field'} == 1 and not $$field[0] =~ /$context->{'field_regex'}/
247 0 0 0 not defined $ind1 or $ind1 ne $context->{'ind1'}
252 0 0 0 not defined $ind2 or $ind2 ne $context->{'ind2'}
309 0 0 0 not defined $ind1 or $ind1 ne $context->{'ind1'}
314 0 0 0 not defined $ind2 or $ind2 ne $context->{'ind2'}
367 0 0 2 not defined $ind1 or $ind1 ne $context->{'ind1'}
372 0 0 0 not defined $ind2 or $ind2 ne $context->{'ind2'}
411 7 0 113 $context->{'is_regex_field'} == 0 and $$field[0] eq $context->{'field'} or $context->{'is_regex_field'} == 1 and $$field[0] =~ /$context->{'field_regex'}/
479 40 0 7 $_[3]{'-join'} // $EMPTY
872 0 2 3 $tag eq 'FMT' or substr($tag, 0, 2) eq '00'
882 0 3 0 !defined($subfields[0]) || $subfields[0] eq '_'
913 0 2 3 $tag eq 'FMT' or substr($tag, 0, 2) eq '00'
1066 0 0 0 $context->{'is_regex_field'} == 0 and $tag ne $context->{'field'} or $context->{'is_regex_field'} == 1 and not $tag =~ /$context->{'field_regex'}/
1076 0 0 0 not defined $ind1 or $ind1 ne $context->{'ind1'}
1082 0 0 0 not defined $ind2 or $ind2 ne $context->{'ind2'}
1180 0 0 0 exists $part->{'content'} || exists $part->{'subfields'}
1230 0 0 0 not defined $ind1 or $ind1 ne $context->{'ind1'}
1235 0 0 0 not defined $ind2 or $ind2 ne $context->{'ind2'}