Branch Coverage

blib/lib/MARC/Field.pm
Criterion Covered Total %
branch 83 88 94.3


line true false branch
83 2 4754 unless $class->is_valid_tag($tagno)
93 873 3881 if ($is_control) { }
95 3 870 if @_
99 2 7760 unless defined $indicator
100 52 7708 unless ($self->is_valid_indicator($indicator))
101 6 46 unless $indicator eq ''
107 1 3878 unless @_ >= 2
139 0 1 unless $self->is_valid_tag($tagno)
158 2 95 if ($self->is_control_field)
163 48 47 if ($indno == 1) { }
46 1 elsif ($indno == 2) { }
187 1 4 unless defined $indno and $indno =~ /^[12]$/
189 1 3 if $self->is_control_field
191 1 2 unless $self->is_valid_indicator($indval)
222 1 1 if ($_[0] eq '*')
240 4755 2 if defined $tag and $tag =~ /^[0-9A-Za-z]{3}$/
253 7710 53 if defined $indval and $indval =~ /^[0-9A-Za-z ]$/
267 2 7340 if $extra_controlfield_tags{$tag}
268 1434 5906 if $tag =~ /^\d+$/ and $tag < 10
308 1 29 if $self->is_control_field
314 31 33 if ($code eq $code_wanted) { }
320 1 28 if (wantarray)
341 1 2 if ($self->is_control_field)
363 0 12 unless $self->is_control_field
366 0 12 if @_
384 0 1 if $self->is_control_field
435 1 15 if (scalar @options == 1) { }
14 1 elsif (0 == scalar(@options) % 2) { }
447 1 14 if $match and ref $match ne 'Regexp'
450 2 9 unless $match or @$codes > 0 or @$positions > 0
462 16 4 if (@$codes == 0 || grep({ref $_ ne 'Regexp' and $_ eq $subfield_code unless ref $_ eq 'Regexp' and $subfield_code =~ /$_/;} @$codes) and !$match || $subfield_value =~ /$match/ and @$positions == 0 || grep({$_ == $subfield_num;} @$positions))
525 1 5 if ($self->is_control_field)
540 1 8 if ($arg =~ /^ind[12]$/) { }
550 5 12 if ($data[$i] eq $arg)
559 3 5 unless ($found)
590 0 1 unless ref($new) =~ /^MARC::Field$/
629 71 1 unless defined $delimiter
631 5 67 if ($self->is_control_field)
643 105 10 if not defined $subfields or $code =~ /^[$subfields]$/
661 38 156 if ($self->is_control_field) { }
690 6 39 if ($self->is_control_field) { }
735 4 14 if ($is_control) { }
780 4 26 if (ref $ref eq 'ARRAY') { }
9 17 elsif (defined $ref) { }