Branch Coverage

blib/lib/Tree/Family/Person.pm
Criterion Covered Total %
branch 86 110 78.1


line true false branch
51 0 762 unless my $new_id = _new_id($new_hash)
70 0 762 if $keyMethod eq 'time_pid_rand'
93 1 29401 if @_ == 1
121 0 3715 unless grep /^$key$/, @Fields, @RelationFields
123 9 3706 if not defined $value
138 0 104646 unless grep /^$key$/, @Fields, @RelationFields
139 0 104646 unless $key
153 13690 367 unless @_ == 2
154 362 5 if ($spouse)
155 0 362 unless ref $spouse eq 'Tree::Family::Person'
160 2 3 unless $self->get('spouse')
175 6353 376 unless @_ == 2
176 370 6 if ($dad)
177 0 370 unless ref $dad eq 'Tree::Family::Person'
183 4 2 unless $old_dad
198 7403 378 unless @_ == 2
199 373 5 if ($mom)
200 0 373 unless ref $mom eq 'Tree::Family::Person'
206 4 1 unless $old_mom
223 0 743 unless defined $kid
224 4 739 if grep {$_->id eq $kid->id;} $self->kids
225 689 50 unless $self->get('kids')
239 0 5 unless $self->get('kids')
241 1 3 if $self->gender and $self->gender eq 'f' and $which->mom
242 1 3 if $self->gender and $self->gender eq 'm' and $which->dad
254 957 2735 unless (shift())->get('kids')
275 31 29 unless $self->get('partners')
276 32 28 unless $self->has_partner($partner)
277 16 44 unless $partner->has_partner($self)
282 0 0 unless $self->get('partners')
284 0 0 if $which->has_partner($self)
295 2233 269 unless (shift())->get('partners')
310 61 0 if (defined $value) { }
316 0 61 unless @list
317 29 32 wantarray ? :
338 1441 751 if defined $self->get('generation')
339 0 751 unless defined $value
341 367 384 if $self->dad
342 365 386 if $self->mom
344 716 35 if $self->spouse
369 780 49 $self->spouse ? :
380 22 351 if ($person->dad and $person->mom and !$person->mom->spouse || $person->mom->spouse ne $person->dad and not grep({$_ eq $person->dad;} $person->mom->partners))
399 0 756 unless defined $$_{'generation'}
419 1546 2319 if /kids|partners/i
420 835 1484 unless $self->$_
421 0 1484 $self->$_->isa('REF') ? :
424 0 754 $_->isa('REF') ? :
427 0 32 $_->isa('REF') ? :
439 238 357 if /kids|partners/i
440 183 174 unless $$data{$_}
442 0 174 ref $tmp && $tmp->isa('REF') ? :
444 61 58 unless $$data{'kids'}
445 0 112 ref $_ && $_->isa('REF') ? :
447 88 31 unless $$data{'partners'}
448 0 32 ref $_ && $_->isa('REF') ? :