Branch Coverage

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


line true false branch
39 0 1030 if (@bytes < 3)
46 2 1028 if $part =~ /$bad_words/
47 4 1024 if _valid_when_swapped($part, $i)
59 1 3936 unless my $code = $arg{'code'}
66 1 3935 unless scalar @parts == $parts
70 2914 1080 unless $check eq _checkdigit_alg_1($str, $i)
80 2 6 if ($arg{'words'})
81 1 1 if ($arg{'mode'} and $arg{'mode'} eq 'replace') { }
112 1002 0 if ($have_urandom) { }
113 0 1002 unless open my $fh, '<', $urandom_path
145 94 2984 if $code eq $orig
146 4 2980 if (_checkdigit_alg_1(substr($code, 0, 3), $pos) eq substr($code, 3, 1))