Condition Coverage

blib/lib/Net/BitTorrent/DHT.pm
Criterion Covered Total %
condition 18 54 33.3


and 3 conditions

line !l l&&!r l&&r condition
28 0 47 0 $$args{'Client'} and blessed($$args{'Client'})
0 47 0 $$args{'Client'} and blessed($$args{'Client'}) and $$args{'Client'}->isa('Net::BitTorrent')
109 358 0 0 defined $ok and $ok == 0
193 0 0 198 defined $packet and ref $packet eq 'HASH'
0 0 198 defined $packet and ref $packet eq 'HASH' and $$packet{'y'}
205 0 0 0 defined $ok and $ok == 0
225 47 0 0 defined $ok and $ok == 0
304 12 6 0 not $tracking{refaddr $self}{$$packet{'a'}{'info_hash'}} and scalar keys %{$tracking{refaddr $self};} > 64
586 0 25 0 $torrent and blessed $torrent
0 25 0 $torrent and blessed $torrent and $torrent->isa('Net::BitTorrent::Torrent')
608 0 12 0 $torrent and blessed $torrent
0 12 0 $torrent and blessed $torrent and $torrent->isa('Net::BitTorrent::Torrent')

or 3 conditions

line l !l&&r !l&&!r condition
23 0 0 47 not $args or ref $args ne 'HASH'
147 0 0 58 not defined $nodes{refaddr $self}{$_}{'seen'} or $nodes{refaddr $self}{$_}{'seen'} < time - 900
211 0 0 0 $nodes{refaddr $self}{$paddr}{'id'} ||= $$packet{'a'}{'id'}
254 6 28 0 $$node{'id'} ||= $$packet{'a'}{'id'}
300 18 0 0 $$node{'id'} ||= $$packet{'a'}{'id'}
304 0 0 18 not $$node{'token_o'} or $$packet{'a'}{'token'} ne $$node{'token_o'}