Branch Coverage

blib/lib/Game/Entities.pm
Criterion Covered Total %
branch 60 72 83.3


line true false branch
160 2 114 if &List::Util::any(sub { not ref $_; } , @components)
162 103 11 $self->{'available'}->$is_null ? :
171 0 225 unless defined $guid
172 2 223 if not defined $type or ref $type
182 0 239 unless defined $guid
192 2 157 if ($self->check($guid, $name)) { }
217 0 32 unless defined $guid
220 34 1 unless not defined $_
2 30 if &List::Util::any(sub { ref $_ unless not defined $_; } , @types)
226 0 19 unless defined $guid
228 13 6 unless (@types)
230 2 11 if (my(@all) = keys %{$$self{"components"};})
248 0 6 if &List::Util::any(sub { ref $_; } , @types)
250 2 4 if ($self->{'prefix'})
255 2 6 unless $self->check($guid, $name)
283 0 20 unless defined $guid
287 19 1 if $pos < @{$self->{'entities'};}
304 4 2 unless (ref $comparator)
315 20 40 unless $set->$contains($that)
317 40 0 unless $this == $that
325 1 1 if ((prototype $comparator // '') eq '$$') { }
376 2 1 $res ? :
386 3 21 unless (@types)
394 4 17 if ($self->{'prefix'})
399 14 7 if (@types == 1)
430 3 10 unless &List::Util::all(sub { $self->check($guid, $_); } , @rest)
434 10 10 $_ eq $short ? :
450 2 0 unless @types
453 0 2 unless open my $fh, ">", \my $out
454 1 1 if $print
458 0 4 unless my $set = $self->{'components'}{$_}
459 0 4 unless @{$set->[0] // [];}
461 4 0 if not @types or @names > 1
467 12 6 defined $component ? :
475 2 2 if $index++ < $#names
478 1 1 unless $print