Branch Coverage

blib/lib/Math/Base/Convert.pm
Criterion Covered Total %
branch 68 82 82.9


line true false branch
50 0 2463 if ref $_[0] eq $package
53 252 2211 if ($1 eq 'user')
76 3191 4205 if ($ref = ref $base) { }
4195 10 elsif ($base =~ /\D/) { }
77 526 2665 if ($ref eq 'ARRAY') { }
2664 1 elsif ($ref =~ /^$bs/) { }
80 0 526 unless $len > 1
81 0 526 unless $len < 65536
94 4194 1 if $rv
96 9 1 if exists $num2sub{$base}
106 2075 383 if $to and not ref $to
107 2104 354 if $from and not ref $from
109 3 2455 if (not $from) { }
115 2 2453 if (not $to) { }
127 412 2046 if ($prefix =~ /HEX$/i) { }
214 1832 elsif ($prefix =~ /OCT$/i) { }
212 1620 elsif ($prefix =~ /bin$/) { }
158 348 2179 if (ref $bc and ref $bc eq $package) { }
164 0 2527 unless keys %$bc
165 0 2527 unless defined $nstr
170 660 1867 if ($ref eq 'user' or $fbase > $Math::Base::Convert::signedBase) { }
174 0 1867 $1 && $1 eq '-' ? :
176 548 1319 if ($ref =~ /(HEX)$/i) { }
205 1114 elsif ($ref =~ /bin/i) { }
187 0 2527 if ($nstr =~ /[^\Q$fclass\E]/)
217 363 436 if wantarray
223 363 364 if wantarray
229 0 2252 unless ref $bc
234 1584 668 if (not $slen) { }
54 614 elsif (lc $tref eq lc ref $from) { }
238 0 54 if ($tref ne ref $from)
239 0 0 if ($tref =~ /(?:DNA|HEX)/) { }
249 220 394 if ($fbase & $fbase - 1 or $fblen > 256) { }
0 394 elsif ($fblen > 32 and !$slen > $maxdlen{$fbase}) { }
268 130 484 if ($tbase & $tbase - 1 or $tbase > 256) { }
75 409 elsif ($tbase > 32 and @{$bc->{'b32str'};} == 1) { }
281 378 1874 unless length $nstr
282 1889 363 if wantarray
283 264 99 if ($tbase <= $Math::Base::Convert::signedBase and $tref ne 'user')
293 0 204 unless ref $bc
295 204 0 unless wantarray