Branch Coverage

blib/lib/Bencode.pm
Criterion Covered Total %
branch 55 66 83.3


line true false branch
18 57 82 if (/ \G ( 0 | [1-9] \d* ) : /cgx) { }
21 2 55 if $len > length($_) - pos($_)
27 0 0 $len < 200 ? :
0 55 if $DEBUG
33 4 78 if (/ \G -? 0? \d+ : /cgx)
43 0 113 if $DEBUG
45 33 80 if defined $max_depth
47 30 77 if (defined(my $str = _bdecode_string())) { }
22 55 elsif (/ \G i /cgx) { }
24 31 elsif (/ \G l /cgx) { }
25 6 elsif (/ \G d /cgx) { }
51 1 21 if / \G \z /cgx
53 7 14 unless / \G ( 0 | -? [1-9] \d* ) e /cgx
56 0 14 if $DEBUG
60 0 24 if $DEBUG
62 4 20 if defined $max_depth and $max_depth < 0
67 0 27 if $DEBUG
73 0 25 if $DEBUG
75 3 22 if defined $max_depth and $max_depth < 0
81 0 28 if $DEBUG
83 2 26 if / \G \z /cgx
87 1 25 unless defined $key
89 1 24 if exists $hash{$key}
92 1 21 if not $do_lenient_decode and defined $last_key and $key lt $last_key
95 1 22 if / \G e /cgx
104 4 2 / \G \z /cgx ? :
113 5 26 unless $_ =~ / \G \z /cgx
119 17 15 if (not ref $data) { }
6 9 elsif (ref $data eq 'SCALAR') { }
5 4 elsif (ref $data eq 'ARRAY') { }
4 0 elsif (ref $data eq 'HASH') { }
120 11 6 if $data =~ /\A (?: 0 | -? [1-9] \d* ) \z/x
139 0 13 if @_ != 1