Branch Coverage

blib/lib/Games/Object/Manager.pm
Criterion Covered Total %
branch 95 134 70.9


line true false branch
48 0 0 $cmp == 0 ? :
66 0 27 ref $_[$#_] eq 'HASH' ? :
72 11 4 unless defined &$name
75 0 8 ref $_[$#_] eq 'HASH' ? :
80 11 4 unless defined &$uname
84 11 4 unless defined &$rname
88 11 4 unless defined &$iname
92 11 4 if not defined &$lname
176 1 0 unless (ref $file)
179 0 1 unless $file->open("<$filename")
185 0 1 if (ref $proto) { }
198 0 1 if $line ne 'OBJ:__MANAGER__'
201 0 1 unless $line =~ /^CL:(.+)$/
207 1 0 if defined $filename
234 1 0 unless (ref $file)
237 0 1 unless $file->open(">$filename")
250 1 0 if defined $filename
262 26 386 unless (defined $id)
263 0 26 if ($assert) { }
269 0 386 if ref $id and UNIVERSAL::isa($id, 'Games::Object')
270 381 5 if (defined $$man{'index'}{$id}) { }
1 4 elsif ($assert) { }
297 325 34 if (ref $obj and UNIVERSAL::isa($obj, 'Games::Object')) { }
32 2 elsif (defined $$man{'index'}{$obj}) { }
1 1 elsif ($assert) { }
299 325 0 defined $$man{'index'}{$id} ? :
322 28 5 unless defined $id
323 6 27 unless defined $id
326 1 32 if defined $$man{'index'}{$id}
370 0 1 @_ && ref $_[$#_] eq 'HASH' ? :
373 0 1 @_ ? :
377 0 1 unless defined $$man{'index'}{$id}
389 1 0 if defined $$man{'relate_from'}{$id}
406 1 0 if defined $$man{'relate_to'}{$id}
451 1 12 ref $method eq 'CODE' ? :
452 1 12 if $code
454 10 3 unless defined $method
464 1 12 $code ? :
468 10 3 if $method eq 'process'
470 29 0 if UNIVERSAL::can($obj, $method)
484 0 0 if (@_) { }
497 0 0 $assert ? :
684 0 defined $$man{'relation_def'}{$how} ? :
524 0 11 unless $args{'relate_method'}
526 0 11 unless $args{'unrelate_method'}
528 0 11 unless $args{'related_method'}
530 0 11 unless $args{'related_list_method'}
532 0 11 unless $args{'is_related_method'}
569 32 0 unless defined $other
592 1 31 unless $check
595 5 26 if (defined $$man{'relate_to'}{$idobject}{$how})
598 0 5 if ($$man{'relate_to'}{$idobject}{$how} eq $idself) { }
5 0 elsif ($man->unrelate('how', $how, 'object', $object, 'force', $force, 'args', {'source', 'relate', %$aargs})) { }
621 26 0 if ($$rel{'flags'} & 1)
625 1 25 if $man->is_related('object', $self, 'self', $object, 'how', $how, 'distant', 1)
637 9 16 unless defined $$man{'relate_from'}{$idself}{$how}
670 81 80 defined $$man{'relate_to'}{$id} && defined $$man{'relate_to'}{$id}{$how} ? :
694 4 0 if defined $$man{'relate_from'}{$id} and defined $$man{'relate_from'}{$id}{$how}
720 0 46 unless defined $idobject and defined $idself
723 26 20 unless defined $$man{'relate_to'}{$idobject} and defined $$man{'relate_to'}{$idobject}{$how}
727 6 14 if $$man{'relate_to'}{$idobject}{$how} eq $idself
730 2 12 unless $distant
764 8 9 unless defined $$aargs{'source'}
768 12 5 if (defined $$man{'relate_to'}{$idobject} and defined $$man{'relate_to'}{$idobject}{$how}) { }
773 8 4 unless defined $other
781 12 0 if ($check) { }
786 18 12 if $item ne $idobject