Branch Coverage

blib/lib/Game/Entities.pm
Criterion Covered Total %
branch 56 68 82.3


line true false branch
153 2 109 if &List::Util::any(sub { not ref $_; } , @components)
155 98 11 $self->{'available'}->$is_null ? :
164 0 206 unless defined $guid
165 2 204 if not defined $type or ref $type
176 0 232 unless defined $guid
186 1 152 if ($self->check($guid, $name)) { }
212 0 30 unless defined $guid
215 32 1 unless not defined $_
2 28 if &List::Util::any(sub { ref $_ unless not defined $_; } , @types)
221 0 17 unless defined $guid
223 13 4 unless (@types)
225 2 11 if (my(@all) = keys %{$$self{'components'};})
243 0 4 if &List::Util::any(sub { ref $_; } , @types)
246 1 5 unless $self->check($guid, $name)
275 0 20 unless defined $guid
279 19 1 if $pos < @{$self->{'entities'};}
295 4 2 unless (ref $comparator)
304 20 40 unless $set->$contains($that)
306 40 0 unless $this == $that
314 1 1 if ((prototype $comparator // '') eq '$$') { }
365 1 1 $res ? :
375 3 19 unless (@types)
384 13 6 if (@types == 1)
415 2 9 unless &List::Util::all(sub { $self->check($guid, $_); } , @rest)
419 9 9 $_ eq $short ? :
435 2 0 unless @types
438 0 2 unless open my $fh, '>', \my $out
439 1 1 if $print
443 0 4 unless my $set = $self->{'components'}{$_}
444 0 4 unless @{$set->[0] // [];}
446 4 0 if not @types or @names > 1
452 12 6 defined $component ? :
460 2 2 if $index++ < $#names
463 1 1 unless $print