Branch Coverage

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


line true false branch
27 0 18 $params{'strong'} ? :
63 3 23 unless (defined $_can_haz{'passwdxs'})
65 3 0 if $INC[-1] eq '.'
85 9 0 if have_passwd_xs()
89 0 0 if defined $_can_haz{$type}
90 0 0 if (exists $_shatests{$type} and $_shatests{$type}->())
97 2 0 if have_passwd_xs()
98 0 0 if defined $_can_haz{'md5'}
100 0 0 if ($testc and index($testc, '$1$abcd$') == 0)
110 0 7 unless ($type)
112 0 0 have_sha(256) ? :
0 0 have_sha(512) ? :
0 0 have_md5() ? :
120 1 6 if $type eq 'bcrypt'
121 4 2 if $type =~ /^sha-?(\d{3})$/
122 1 1 if $type eq 'md5'
137 0 16 unless defined $pwd
142 2 14 ref $_[0] eq 'HASH' ? :
143 13 3 defined $opts{'type'} ? :
149 10 6 if ($type =~ /^bcrypt$/i)
152 0 10 unless $cost =~ /^[0-9]+$/
154 4 6 if length $cost == 1
163 2 4 if ($type =~ /^sha-?512$/i)
164 0 2 unless have_sha(512)
170 3 1 if ($type =~ /^sha(-?256)?$/i)
171 0 3 unless have_sha(256)
177 1 0 if ($type =~ /^md5$/i)
178 0 1 unless have_md5()
187 6 0 have_passwd_xs() ? :
198 1457 5 defined $schr ? :
394 1068 if substr($orig, $n, 1) ne (defined $schr ? $schr : '')
207 0 23 unless defined $pwd and $crypt
212 1 22 unless $pos_a == 0 and $pos_b == 2 or $pos_b == 3
217 15 8 if ($crypt =~ /^\$2a\$\d{2}\$/) { }
219 8 7 if _eq($crypt, &bcrypt($pwd, $crypt))
221 8 0 if (have_passwd_xs()) { }
222 4 4 if _eq($crypt, Crypt::Passwd::XS::crypt($pwd, $crypt))
225 0 0 if _eq($crypt, crypt($pwd, $crypt))