Branch Coverage

blib/lib/Bencode.pm
Criterion Covered Total %
branch 68 80 85.0


line true false branch
15 0 42 unless @c
21 57 83 if (/ \G ( 0 | [1-9] \d* ) : /cgx) { }
24 2 55 if $len > length($_) - pos($_)
30 0 0 $len < 200 ? :
0 55 if $DEBUG
36 4 79 if (/ \G -? 0? \d+ : /cgx)
46 0 114 if $DEBUG
48 33 81 if defined $max_depth
50 30 78 if (defined(my $str = _bdecode_string())) { }
23 55 elsif (/ \G i /cgx) { }
24 31 elsif (/ \G l /cgx) { }
25 6 elsif (/ \G d /cgx) { }
54 1 22 if / \G \z /cgx
56 7 15 unless / \G ( 0 | -? [1-9] \d* ) e /cgx
59 0 15 if $DEBUG
63 0 24 if $DEBUG
65 4 20 if defined $max_depth and $max_depth < 0
70 0 27 if $DEBUG
76 0 25 if $DEBUG
78 3 22 if defined $max_depth and $max_depth < 0
84 0 28 if $DEBUG
86 2 26 if / \G \z /cgx
90 1 25 unless defined $key
93 1 24 if exists $hash{$key}
95 1 21 if not $do_lenient_decode and defined $last_key and $key lt $last_key
98 1 22 if / \G e /cgx
107 4 2 / \G \z /cgx ? :
116 5 27 unless $_ =~ / \G \z /cgx
127 11 6 /\A (?: 0 | -? [1-9] \d* ) \z/x ? :
4 0 'HASH' eq ref $_ ? :
8 4 'ARRAY' eq ref $_ ? :
1 12 'SCALAR' eq ref $_ ? :
17 13 !ref($_) ? :
5 30 !defined($_) ? :
133 7 14 @_ == 2 ? :
134 1 20 unless defined $undef_mode
135 1 3 'die' eq $undef_mode ? :
1 4 'num' eq $undef_mode ? :
16 5 'str' eq $undef_mode ? :
140 0 18 if @_ != 1