Branch Coverage

blib/lib/Bifcode2.pm
Criterion Covered Total %
branch 126 156 80.7


line true false branch
71 0 73 if $@
94 4 29 unless (/ \G (b|u) (?: ( 0 | [1-9] [0-9]* ) \. )? /cgx)
95 0 4 / \G \z /cgx ? :
98 1 28 if ($1 eq 'b') { }
28 0 elsif ($1 eq 'u') { }
100 0 1 if $len > length($_) - pos($_)
105 0 1 unless / \G : /cgx
110 0 28 if $len > length($_) - pos($_)
115 0 28 unless / \G : /cgx
121 33 124 if defined $max_depth
123 8 149 unless (/$chunk/cg)
124 4 4 / \G \z /cgx ? :
127 8 141 if ($1 eq '~,') { }
3 138 elsif ($1 eq 'f,') { }
3 135 elsif ($1 eq 't,') { }
1 134 elsif ($1 eq 'N,') { }
1 133 elsif ($1 eq '-,') { }
1 132 elsif ($1 eq '+,') { }
6 126 elsif ($1 eq 'b') { }
40 86 elsif ($1 eq 'u') { }
20 66 elsif ($1 eq 'i') { }
11 55 elsif ($1 eq 'r') { }
26 29 elsif ($1 eq '[') { }
29 0 elsif ($1 eq '{') { }
0 0 elsif ($1 eq 'B') { }
150 1 3 if $len > length($_) - pos($_)
155 1 2 unless / \G , /cgx
160 2 33 if $len > length($_) - pos($_)
165 2 31 unless / \G , /cgx
169 12 8 if defined $2
170 1 7 if / \G \z /cgx
174 8 3 unless (defined $2)
175 1 7 if / \G \z /cgx
178 1 1 if $2 eq 0 and $3 eq 0 and $4 ne 0
186 4 22 if defined $max_depth and $max_depth < 0
195 3 26 if defined $max_depth and $max_depth < 0
200 2 33 if / \G \z /cgx
204 1 28 if exists $hash{$key}
205 1 27 if defined $last_key and $key lt $last_key
207 1 26 if / \G \} /cgx
216 0 0 if $len > length($_) - pos($_)
219 0 0 unless / \G , /cgx
229 1 99 if @_
230 2 97 unless defined $_
232 1 96 if utf8::is_utf8($_)
236 4 38 unless $_ =~ / \G \z /cgx
246 4 96 if (not defined $_) { }
48 48 elsif ((my $ref = ref $_) eq '') { }
5 43 elsif ($ref eq 'ARRAY') { }
7 36 elsif ($ref eq 'HASH') { }
6 30 elsif ($ref eq 'SCALAR' or $ref eq 'Bifcode2::BYTES') { }
4 26 elsif (&boolean::isBoolean($_)) { }
4 22 elsif ($ref eq 'Bifcode2::INTEGER') { }
9 13 elsif ($ref eq 'Bifcode2::REAL') { }
3 10 elsif ($ref eq 'Bifcode2::UTF8') { }
1 9 elsif (eval { do { $_->is_nan } }) { }
6 3 elsif (eval { do { $_->is_inf } }) { }
2 1 elsif (my $a = eval { do { [$_->is_int] } }) { }
250 36 12 if ($_ =~ /$number_qr/) { }
3 9 elsif (utf8::is_utf8($_)) { }
9 0 elsif ($_ =~ /^[\x{20}-\x{7E}]*$/) { }
251 26 10 if (defined $3 or defined $5) { }
287 13 1 if ($k =~ /^[\x{20}-\x{7E}]*$/) { }
1 0 elsif (utf8::is_utf8($k)) { }
306 2 2 $_ ? :
310 2 1 unless $$_ =~ /\A (?: 0 | -? [1-9] [0-9]* ) \z/x
316 1 7 unless $$_ =~ /$number_qr/
333 3 3 $_->is_pos ? :
336 1 1 $a->[0] ? :
347 0 78 if (@_ == 2 and pop()) { }
76 2 elsif (@_ == 1) { }
363 0 16 unless defined $ref and defined $type
381 0 0 unless @_ >= 2 and @_ <= 3
411 0 0 unless defined $_[0]{'rbuf'}
414 0 0 unless length $_[0]{'rbuf'}
418 0 0 if (length $3) { }
0 0 elsif (not length $1) { }
423 0 0 if ($@) { }