Branch Coverage

blib/lib/Genealogy/Gedcom/Date.pm
Criterion Covered Total %
branch 99 136 72.7


line true false branch
119 46 0 unless (defined $self->logger)
339 392 64 if ($result->{'type'} and $result->{'type'} =~ /(?:French|Gregorian|Hebrew|Julian)/) { }
348 258 198 if ($result->{'type'} and $result->{'type'} =~ /(French r|German|Hebrew|Julian)/)
353 65 20 $date ? :
85 371 defined $result->{'day'} ? :
355 177 279 if ($result->{'month'}) { }
357 85 92 if (defined $result->{'day'}) { }
359 85 0 $date ? :
363 72 20 $date ? :
366 177 0 $date ? :
370 121 157 $date ? :
278 1 if defined $result->{'year'}
373 59 397 if defined $result->{'suffix'}
374 54 402 if $result->{'bce'}
376 16 440 if (defined $result->{'phrase'})
378 15 1 $date ? :
397 0 0 $date[$i] ? :
0 0 $result->[$i]{'flag'} ? :
400 0 0 $date[1] ? :
423 0 21 $#$result_1 < 0 ? :
425 0 21 $#$result_2 < 0 ? :
435 3 18 if ($date_1->{'kind'} ne $date_2->{'kind'} or $date_1->{'type'} ne $date_2->{'type'}) { }
1 17 elsif ($date_1->{'bce'} and $date_2->{'bce'} eq '') { }
1 16 elsif ($date_1->{'bce'} eq '' and $date_2->{'bce'}) { }
455 1 15 if ($form_1 eq $form_2) { }
1 14 elsif ($date_1->{'bce'}) { }
9 5 elsif ($form_1 lt $form_2) { }
463 1 0 if ($form_1 lt $form_2) { }
502 7546 4978 if ($ref_type eq 'ARRAY') { }
4978 0 elsif ($ref_type eq 'HASH') { }
0 0 elsif ($ref_type) { }
531 397 0 if $self->logger
540 38 4 unless defined $date->{'bce'}
541 36 6 unless defined $date->{'day'} and $date->{'day'} =~ /^\d+$/
542 0 42 unless defined $date->{'kind'}
543 30 12 unless defined $date->{'month'}
544 0 42 unless defined $date->{'type'}
545 0 42 unless defined $date->{'year'}
547 0 42 if $index >= 0
558 0 397 defined $args{'canonical'} ? :
559 0 397 $canonical > 2 ? :
0 397 $canonical < 0 ? :
560 397 0 defined $args{'date'} ? :
561 0 397 unless defined $date
567 0 397 $#chars < $i ? :
571 397 7152 if ($i > $#chars or $chars[$i] eq '(') { }
577 4 7148 if $chars[$i] eq ','
600 0 397 if (length $date == 0)
613 0 397 if ($ambiguity_metric <= 0) { }
161 236 elsif ($ambiguity_metric == 1) { }
619 0 0 $suffix_length == 1 ? :
650 397 0 if ($self->canonical == 0) { }
0 0 elsif ($self->canonical == 1) { }
663 0 397 if not $self->error and $#$result < 0
693 2162 2560 if ($item->{'kind'} eq 'Calendar')
700 638 1922 if ($calendar eq $item->{'type'})
706 489 149 if (exists $item->{'flag'} and exists $count{$item->{'flag'}}) { }
708 141 348 if ($count{$item->{'flag'}} == 0)
723 1352 1208 if ($#$result == 1)
725 12 1340 if ($result->[0]{'flag'} eq 'AND' and $result->[1]{'flag'} eq 'BET') { }
2 2676 elsif ($result->[0]{'flag'} eq 'TO' and $result->[1]{'flag'} eq 'FROM') { }
755 74 87 if ($#$value == 0) { }
0 87 elsif ($#$value == 2) { }
4 83 elsif ($#$value == 3) { }
82 1 elsif ($value->[0]{'kind'} eq 'Calendar') { }
1 0 elsif ($value->[0]{'type'} eq $calendar and $value->[1]{'type'} eq $calendar) { }
759 18 56 if ($value->{'type'} =~ /^(?:$calendar|Phrase)$/) { }
780 82 0 if ($calendar eq $value->[1]{'type'})