Branch Coverage

blib/lib/Algorithm/CouponCode.pm
Criterion Covered Total %
branch 21 24 87.5


line true false branch
42 0 1029 if (@bytes < 3)
49 2 1027 if $part =~ /$bad_words/
50 3 1024 if _valid_when_swapped($part, $i)
62 1 3932 unless my $code = $arg{'code'}
69 1 3931 unless scalar @parts == $parts
73 2910 1080 unless $check eq _checkdigit_alg_1($str, $i)
83 2 6 if ($arg{'words'})
84 1 1 if ($arg{'mode'} and $arg{'mode'} eq 'replace') { }
115 1002 0 if ($have_urandom) { }
116 0 1002 unless open my $fh, '<', $urandom_path
148 99 2978 if $code eq $orig
149 3 2975 if (_checkdigit_alg_1(substr($code, 0, 3), $pos) eq substr($code, 3, 1))