Branch Coverage

blib/lib/App/bmkpasswd.pm
Criterion Covered Total %
branch 44 74 59.4


line true false branch
27 0 18 $params{'strong'} ? :
39 5 20 unless (defined $_can_haz{'passwdxs'})
59 8 0 if have_passwd_xs()
63 0 0 if defined $_can_haz{$type}
64 0 0 if (exists $_shatests{$type} and $_shatests{$type}->())
71 2 0 if have_passwd_xs()
72 0 0 if defined $_can_haz{'md5'}
74 0 0 if ($testc and index($testc, '$1$abcd$') == 0)
84 0 5 unless ($type)
86 0 0 have_sha(256) ? :
0 0 have_sha(512) ? :
0 0 have_md5() ? :
94 1 4 if $type eq 'bcrypt'
95 3 1 if $type =~ /^sha-?(\d{3})$/
96 1 0 if $type eq 'md5'
133 0 16 unless defined $pwd
138 2 14 ref $_[0] eq 'HASH' ? :
139 13 3 defined $opts{'type'} ? :
145 10 6 if ($type =~ /^bcrypt$/i)
148 0 10 unless $cost =~ /^[0-9]+$/
150 4 6 if length $cost == 1
159 2 4 if ($type =~ /^sha-?512$/i)
160 0 2 unless have_sha(512)
166 3 1 if ($type =~ /^sha(-?256)?$/i)
167 0 3 unless have_sha(256)
173 1 0 if ($type =~ /^md5$/i)
174 0 1 unless have_md5()
183 6 0 have_passwd_xs() ? :
194 1457 5 defined $schr ? :
388 1074 if substr($orig, $n, 1) ne (defined $schr ? $schr : '')
203 0 23 unless defined $pwd and $crypt
208 1 22 unless $pos_a == 0 and $pos_b == 2 or $pos_b == 3
213 15 8 if ($crypt =~ /^\$2a\$\d{2}\$/) { }
215 8 7 if _eq($crypt, &bcrypt($pwd, $crypt))
217 8 0 if (have_passwd_xs()) { }
218 4 4 if _eq($crypt, Crypt::Passwd::XS::crypt($pwd, $crypt))
221 0 0 if _eq($crypt, crypt($pwd, $crypt))