Branch Coverage

blib/lib/App/bmkpasswd.pm
Criterion Covered Total %
branch 46 76 60.5


line true false branch
30 0 18 $params{'strong'} ? :
66 3 23 unless (defined $_can_haz{'passwdxs'})
68 3 0 if $INC[-1] eq '.'
88 9 0 if have_passwd_xs()
92 0 0 if defined $_can_haz{$type}
93 0 0 if (exists $_shatests{$type} and $_shatests{$type}->())
100 2 0 if have_passwd_xs()
101 0 0 if defined $_can_haz{'md5'}
103 0 0 if ($testc and index($testc, '$1$abcd$') == 0)
113 0 7 unless ($type)
115 0 0 have_sha(256) ? :
0 0 have_sha(512) ? :
0 0 have_md5() ? :
123 1 6 if $type eq 'bcrypt'
124 4 2 if $type =~ /^sha-?(\d{3})$/
125 1 1 if $type eq 'md5'
140 0 16 unless defined $pwd
145 2 14 ref $_[0] eq 'HASH' ? :
146 13 3 defined $opts{'type'} ? :
152 10 6 if ($type =~ /^bcrypt$/i)
155 0 10 unless $cost =~ /^[0-9]+$/
157 4 6 if length $cost == 1
166 2 4 if ($type =~ /^sha-?512$/i)
167 0 2 unless have_sha(512)
173 3 1 if ($type =~ /^sha(-?256)?$/i)
174 0 3 unless have_sha(256)
180 1 0 if ($type =~ /^md5$/i)
181 0 1 unless have_md5()
190 6 0 have_passwd_xs() ? :
201 1455 5 defined $schr ? :
392 1068 if substr($orig, $n, 1) ne (defined $schr ? $schr : '')
210 0 23 unless defined $pwd and $crypt
215 1 22 unless $pos_a == 0 and $pos_b == 2 or $pos_b == 3
220 15 8 if ($crypt =~ /^\$2a\$\d{2}\$/) { }
222 8 7 if _eq($crypt, &bcrypt($pwd, $crypt))
224 8 0 if (have_passwd_xs()) { }
225 4 4 if _eq($crypt, Crypt::Passwd::XS::crypt($pwd, $crypt))
228 0 0 if _eq($crypt, crypt($pwd, $crypt))