Branch Coverage

blib/lib/Bit/Vector/String.pm
Criterion Covered Total %
branch 65 84 77.3


line true false branch
38 0 108 unless @_ == 1
44 0 108 if ($@)
56 0 27 unless @_ == 2
60 27 0 if ($string =~ /^[0-7]+$/) { }
63 0 27 if ($@)
80 0 54 unless @_ == 3
85 54 0 if ($string =~ /^[0-7]+$/) { }
87 27 27 unless (defined $bits)
89 0 54 if ($@)
106 0 486 unless @_ == 1 or @_ == 2
111 0 486 if (not defined $type && $type) { }
81 405 elsif ($type eq '1' or $type =~ /^b(?:in)?$/i) { }
81 324 elsif ($type eq '2' or $type =~ /^o(?:ct)?$/i) { }
81 243 elsif ($type eq '3' or $type =~ /^d(?:ec)?$/i) { }
81 162 elsif ($type eq '4' or $type =~ /^(?:h(?:ex)?|x)$/i) { }
81 81 elsif ($type eq '5' or $type =~ /^e(?:num)?$/i) { }
81 0 elsif ($type eq '6' or $type =~ /^p(?:ack)?$/i) { }
143 0 486 if ($@)
155 0 306 unless @_ == 2
160 54 252 if ($string =~ /^(?:0[bB])?([01]+)$/) { }
45 207 elsif ($string =~ /^(?:0[oO])?([0-7]+)$/) { }
54 153 elsif ($string =~ /^(?:[+-])?[0-9]+$/) { }
45 108 elsif ($string =~ /^(?:0[hHxX])?([0-9A-Fa-f]+)$/) { }
54 54 elsif ($string =~ /^[(<{\[]?([0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*)[)>}\]]?$/) { }
54 0 elsif ($string =~ s/^:\d+://) { }
194 0 306 if ($@)
206 0 324 unless @_ == 3
212 54 270 if ($string =~ /^(?:0[bB])?([01]+)$/) { }
54 216 elsif ($string =~ /^(?:0[oO])?([0-7]+)$/) { }
54 162 elsif ($string =~ /^(?:[+-])?([0-9]+)$/) { }
54 108 elsif ($string =~ /^(?:0[hHxX])?([0-9A-Fa-f]+)$/) { }
54 54 elsif ($string =~ /^[(<{\[]?([0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*)[)>}\]]?$/) { }
54 0 elsif ($string =~ s/^:(\d+)://) { }
215 27 27 unless (defined $bits)
221 27 27 unless (defined $bits)
227 27 27 unless (defined $bits)
233 27 27 unless (defined $bits)
240 27 27 unless (defined $bits)
243 940 18 if $1 > $bits
251 27 27 unless defined $bits
258 0 324 if ($@)
265 324 0 if (wantarray)