Branch Coverage

blib/lib/MARC/Spec/Parser.pm
Criterion Covered Total %
branch 57 74 77.0


line true false branch
49 47 0 if (@args % 2 == 1)
57 23 14 if ($self->{'_parsed'}{'subfields'})
73 2 42 unless ($self->{'_parsed'}{'tag'})
77 3 39 if (length $self->{'_parsed'}{'field'} != length $self->spec)
84 1 38 if (defined $self->{'_parsed'}{'indicators'}) { }
7 31 elsif (defined $self->{'_parsed'}{'charpos'}) { }
86 1 0 if ('_' ne $ind1)
88 1 0 if (2 == length $self->{'_parsed'}{'indicators'})
90 1 0 if ('_' ne $ind2)
96 9 29 if (defined $self->{'_parsed'}{'index'})
100 1 37 if (defined $field->char_start and defined $self->{'_parsed'}{'subfields'})
106 3 34 if ($self->{'_parsed'}{'subspecs'})
117 29 33 if (1 < scalar @{$subspec;}) { }
139 1 25 if (defined $+{'range'}) { }
151 1 22 if (0 == $i)
163 4 47 if (defined $args{'index'})
167 1 50 if (defined $args{'charpos'})
172 30 21 if (defined $args{'subspecs'})
192 0 91 if ($subTerms =~ /$UNESCAPED/)
196 0 91 unless ($subTerms =~ /$SUBTERMS/gs)
204 175 7 if (defined $+{$side}) { }
7 0 elsif ($side eq 'left') { }
205 91 84 if ('\\' ne substr($+{$side}, 0, 1)) { }
209 79 12 if ($cache{$spec}) { }
221 2 5 if ($cache{$spec}) { }
232 84 7 if (defined $+{'operator'})
242 2 96 if ($spec eq $fullcontext)
245 0 96 if ($firstChar eq '_')
248 0 0 if (0 <= $refPos)
249 0 0 if ('$' ne substr($fullcontext, $refPos - 1, 1))
256 9 87 if ($firstChar eq '$')
258 0 87 if ($firstChar =~ m(\[|/))
261 0 0 if (0 <= $refPos)
262 0 0 if ('$' ne substr($fullcontext, $refPos - 1, 1))
275 1 69 if (ref \$spec ne 'SCALAR')
279 1 68 if ($spec =~ /\s/s)
283 1 67 if ($min_length > length $spec)