Branch Coverage

blib/lib/Net/BitTorrent/Util.pm
Criterion Covered Total %
branch 46 48 95.8


line true false branch
21 5123 6 defined $ref ? :
22 4221 908 if (not ref $ref) { }
209 699 elsif (ref $ref eq 'ARRAY') { }
697 2 elsif (ref $ref eq 'HASH') { }
23 374 3847 defined $ref && $ref =~ /^[-+]?\d+$/ ? :
45 1 10674 unless defined $string
47 8605 2069 if ($string =~ /^([1-9]\d*):/s or $string =~ /^(0+):/s) { }
407 1662 elsif ($string =~ s/^i([-+]?\d+)e//s) { }
246 1416 elsif ($string =~ s/^l(.*)//s) { }
1405 11 elsif ($string =~ s/^d(.*)//s) { }
50 7 8598 if $1 =~ /^0+$/
55 1 8597 unless $1
59 8600 4 wantarray ? :
62 402 5 wantarray ? :
70 245 1 wantarray ? :
77 4804 0 if $leftover
78 4804 0 if defined $key
80 934 471 wantarray ? :
87 62 144 unless (@peers)
91 1 454 unless $peer
93 5 449 if (not $peer =~ /^(?:(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.]?){4}):\d+$/) { }
1 448 elsif ($port > 65536) { }
112 14 184 unless (defined $string)
121 183 1 %peers ? :