Branch Coverage

blib/lib/Biblio/SICI/ItemSegment.pm
Criterion Covered Total %
branch 41 136 30.1


line true false branch
28 0 59 unless ($newVal =~ /\A[0-9X-]+\Z/)
32 0 59 unless ($newVal =~ /\A[0-9]{4}\-[0-9]{3}[0-9X]\Z/)
36 59 0 unless (@problems)
37 59 0 if (my $is = 'Business::ISSN'->new($newVal))
38 0 59 unless ($is->is_valid)
44 0 59 if (@problems) { }
76 11 47 if ($newVal =~ /\A[0-9]{4}\Z/) { }
1 46 elsif ($newVal =~ m[\A([0-9]{4})/([0-9]{4})\Z]) { }
24 22 elsif ($newVal =~ /\A([0-9]{4})([0-9]{2})\Z/) { }
7 15 elsif ($newVal =~ m[\A([0-9]{4})([0-9]{2})/([0-9]{2})\Z]) { }
1 14 elsif ($newVal =~ m[\A([0-9]{4})([0-9]{2})/([0-9]{4})([0-9]{2})\Z]) { }
14 0 elsif ($newVal =~ /\A([0-9]{4})([0-9]{2})([0-9]{2})\Z/) { }
0 0 elsif ($newVal =~ m[\A([0-9]{4})([0-9]{2})([0-9]{2})/([0-9]{2})\Z]) { }
0 0 elsif ($newVal =~ m[\A([0-9]{4})([0-9]{2})([0-9]{2})/([0-9]{2})([0-9]{2})\Z]) { }
0 0 elsif ($newVal =~ m[\A([0-9]{4})([0-9]{2})([0-9]{2})/([0-9]{4})([0-9]{2})([0-9]{2})\Z]) { }
83 0 1 unless ($e{'2Y'} > $e{'1Y'})
96 0 7 unless ($e{'2M'} > $e{'1M'})
106 0 1 unless ($e{'2Y'} > $e{'1Y'})
121 0 0 unless ($e{'2D'} > $e{'1D'})
132 0 0 unless ($e{'2M'} > $e{'1M'})
144 0 0 unless ($e{'2Y'} > $e{'1Y'})
158 0 58 if ($year == 9) { }
168 0 116 if (exists $e{$_} and not $e{$_} =~ /\A(?:[012][0-9]|3[01])\Z/)
169 0 0 $_ eq '2D' ? :
176 0 116 if (exists $e{$_} and not $e{$_} =~ /\A(?:0[0-9]|1[012]|[23][1-4])\Z/)
177 0 0 $_ eq '2M' ? :
184 0 116 if (exists $e{$_} and not $e{$_} =~ /\A(?:1[0-9][0-9]{2}|20[0-$prevDecade][0-9]|20${decade}[0-$year])\Z/o)
187 0 0 $_ eq '2Y' ? :
191 58 0 if (not @problems) { }
215 0 17 unless ($newVal =~ /\A[0-9A-Z:]*[+*]?\Z/)
233 0 40 unless ($newVal =~ m[\A[A-Z0-9/]+\Z])
237 0 40 unless ($newVal =~ m[\A[A-Z0-9]+(?:/[A-Z0-9]+)?\Z])
241 0 40 if (@problems) { }
263 0 40 unless ($newVal =~ m[\A[A-Z0-9/]+\Z])
267 0 40 unless ($newVal =~ m[\A[A-Z0-9]+(?:/[A-Z0-9]+)?\Z])
271 0 40 if (@problems) { }
293 0 0 if (length $newVal != 1)
297 0 0 if ($newVal ne '+' and $newVal ne '*')
301 0 0 if (@problems) { }
315 0 0 unless $self->has_chronology
329 0 0 if ($c =~ /\A[0-9]{4}\Z/) { }
0 0 elsif ($c =~ m[\A([0-9]{4})/([0-9]{4})\Z]) { }
0 0 elsif ($c =~ /\A([0-9]{4})(?:[0-9]{2})\Z/) { }
0 0 elsif ($c =~ m[\A([0-9]{4})(?:[0-9]{2})/(?:[0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A([0-9]{4})(?:[0-9]{2})/([0-9]{4})(?:[0-9]{2})\Z]) { }
0 0 elsif ($c =~ /\A([0-9]{4})(?:[0-9]{2})(?:[0-9]{2})\Z/) { }
0 0 elsif ($c =~ m[\A([0-9]{4})(?:[0-9]{2})(?:[0-9]{2})/(?:[0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A([0-9]{4})(?:[0-9]{2})(?:[0-9]{2})/(?:[0-9]{2})(?:[0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A([0-9]{4})(?:[0-9]{2})(?:[0-9]{2})/([0-9]{4})(?:[0-9]{2})(?:[0-9]{2})\Z]) { }
364 0 0 unless $self->has_chronology
376 0 0 if ($c =~ /\A(?:[0-9]{4})([0-9]{2})\Z/) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})([0-9]{2})/([0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})([0-9]{2})/(?:[0-9]{4})([0-9]{2})\Z]) { }
0 0 elsif ($c =~ /\A(?:[0-9]{4})([0-9]{2})(?:[0-9]{2})\Z/) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})([0-9]{2})(?:[0-9]{2})/(?:[0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})([0-9]{2})(?:[0-9]{2})/([0-9]{2})(?:[0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})([0-9]{2})(?:[0-9]{2})/(?:[0-9]{4})([0-9]{2})(?:[0-9]{2})\Z]) { }
405 0 0 unless $self->has_chronology
414 0 0 if ($c =~ /\A(?:[0-9]{4})(?:[0-9]{2})([0-9]{2})\Z/) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})(?:[0-9]{2})([0-9]{2})/([0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})(?:[0-9]{2})([0-9]{2})/(?:[0-9]{2})([0-9]{2})\Z]) { }
0 0 elsif ($c =~ m[\A(?:[0-9]{4})(?:[0-9]{2})([0-9]{2})/(?:[0-9]{4})(?:[0-9]{2})([0-9]{2})\Z]) { }
436 179 0 if ($self->has_issn)
440 176 3 if ($self->has_chronology) { }
447 52 127 if ($self->has_enumeration) { }
451 118 9 if ($self->has_volume)
453 118 0 if ($self->has_issue)
457 0 127 if ($self->has_supplOrIdx)