Branch Coverage

blib/lib/Tree/Family.pm
Criterion Covered Total %
branch 79 96 82.2


line true false branch
73 0 27 unless my $filename = $args{'filename'}
81 869 27 if exists $$self{'people'}
83 15 12 if (-e $$self{'filename'} and -s $$self{'filename'}) { }
90 0 27 unless ref $$self{'people'} eq 'HASH'
100 29 12 if not $args{'force'} and $haveSet
104 739 12 if $person->generation
126 0 16 unless open FP, ">$tmpfile"
129 0 16 unless rename $tmpfile, $filename
239 0 9 unless $filename
241 0 9 unless open FP, ">$tmpfile"
243 0 9 unless close FP
244 0 9 unless rename $tmpfile, $filename
256 0 1470 if defined $person and not defined $person->id
257 730 740 if $$people_written{$person->id}
263 357 383 if $person->mom
264 358 382 if $person->dad
265 361 379 if ($people and @$people) { }
272 340 7 if ($person->spouse and ($person->mom and $person->dad) and ($person->spouse->mom and $person->spouse->dad))
278 308 32 if (had_kids($person, $person->spouse)) { }
285 338 2 if ($person->mom->spouse or $person->dad->spouse) { }
292 379 361 unless $people
297 373 367 unless $$subgraph_written{$subgraph_index}
315 0 4331 unless defined $a->get('generation') and defined $b->get('generation')
326 357 383 if $person2subgraph{$person->get('id')}
329 0 383 unless @together > 0
352 0 27 unless $this_generation
359 0 11 if grep {not $_;} values %subgraph_written
364 379 361 unless $parent_key
378 11 5 $g == $max_generation ? :
11 16 $g == $min_generation ? :
407 427 62 if grep {$p eq $_;} @all
430 388 384 if $h{join $;, $$e[0]->id, $$e[1]->id}++
431 0 384 if $h{join $;, $$e[1]->id, $$e[0]->id}++
461 288 672 if $seen{$m->id}++
487 681 267 if (_are_married($a, $b))
508 354 14 unless @pairs > 1
521 240 240 if $b & 1 << $k++
525 32 160 if (not defined $min_distance or $d < $min_distance)
543 15 368 if @$people == 1
547 730 22 if $p->spouse
561 365 19 if (_are_married(@$e)) { }
568 0 368 unless $output and $output =~ /\w/
580 0 687 unless defined $x
581 679 8 if grep {$_ eq $x;} @$a
594 0 996 unless $a and $b
595 678 318 if $b->get('gender') eq 'm'
615 329 36 if (had_kids($x, $y)) { }
638 368 372 $person->get('gender') eq 'm' ? :