Condition Coverage

blib/lib/Game/Entities.pm
Criterion Covered Total %
condition 31 46 67.3


or 2 conditions

line l !l condition
190 139 20 $self->{'components'}{$name} //= [[], [], []]
267 2 4 $_->[1][$i] // (next)
312 60 0 $dense->[$j] // die("Undefined in set")
313 60 0 $other->[1][$i] // die("Undefined in other")
325 1 1 prototype $comparator // ""
420 4 0 $map->{$a}[1] // []
4 0 $map->{$b}[1] // []
459 4 0 $set->[0] // []
467 14 4 $set->[0][$_] // "---"
12 6 $set->[1][$_] // "---"
12 6 builtin::refaddr($component) // 0

or 3 conditions

line l !l&&r !l&&!r condition
172 1 1 223 not defined $type or ref $type
186 159 2 0 ref $component || Carp::croak('Component must be a reference')
287 18 1 0 $self->{'entities'}[$pos] // $guid + 1
293 6 0 0 $self->{'components'}{$name} // Carp::croak("Cannot sort ${name}: no such component in registry")
307 4 0 0 $self->{'components'}{$comparator} // Carp::croak("Cannot sort according to ${comparator}: no such component in registry")
402 5 9 0 $self->{'view_cache'}{"|$name|"} //= do { my $set = $self->{'components'}{$name}; my $comps = $set->[2]; "Game::Entities::View"->new(map({my($i, $e) = ($_, $set->[1][$_]); $self->$add_version($e), [$comps->[$i]];} 0 .. $#{$$set[1];})) }
416 3 4 0 $self->{'view_cache'}{'|' . join("|", @types) . '|'} //= do { my $map = $self->{'components'}; my($short, @rest) = (sort {@{$map->{$a}[1] // [];} <=> @{$map->{$b}[1] // [];};} @types); my $set = $self->{'components'}{$short}; my $comps = $set->[2]; my @view; while (my($i, $e) = each @{$$set[1];}) { do { my $guid = $self->$add_version($e); next unless &List::Util::all(sub { $self->check($guid, $_); } , @rest); push @view, $guid, [map({$_ eq $short ? $comps->[$i] : $self->$get(1, $guid, $_);} @types)] }; } ; "Game::Entities::View"->new(@view) }
461 4 0 0 not @types or @names > 1