Condition Coverage

blib/lib/Net/BitTorrent/Protocol/BEP03.pm
Criterion Covered Total %
condition 46 69 66.6


and 3 conditions

line !l l&&!r l&&r condition
73 0 7 0 defined $index and $index =~ /^\d+$/
84 1 1 0 $bitfield and unpack('b*', $bitfield) =~ /^[01]+$/
97 1 12 0 defined $index and $index =~ /^\d+$/
103 1 9 0 defined $offset and $offset =~ /^\d+$/
108 1 6 0 defined $length and $length =~ /^\d+$/
119 1 10 0 defined $index and $index =~ /^\d+$/
124 1 7 0 defined $offset and $offset =~ /^\d+$/
140 1 11 0 defined $index and $index =~ /^\d+$/
146 1 8 0 defined $offset and $offset =~ /^\d+$/
151 1 5 0 defined $length and $length =~ /^\d+$/
162 0 6 0 defined $port and $port =~ /^\d+$/

or 2 conditions

line l !l condition
210 0 1 $packet || ''
224 1 1 $packet || ''
236 0 1 $packet || ''

or 3 conditions

line l !l&&r !l&&!r condition
45 1 1 7 not defined $reserved or length $reserved != 8
51 0 2 5 not defined $infohash or length $infohash != 20
56 0 2 3 not defined $peerid or length $peerid != 20
172 1 1 3 not $packet or length $packet < 68
193 1 0 8 not $packet or length $packet < 1
201 1 0 5 not $packet or length $packet < 1
209 1 0 6 not $packet or length $packet < 9
222 1 1 6 not $packet or length $packet < 9
235 1 0 5 not $packet or length $packet < 9
248 0 0 2 not $packet or length $packet < 1