Branch Coverage

blib/lib/Crypt/RandPasswd.pm
Criterion Covered Total %
branch 89 116 76.7


line true false branch
1375 0 230 if $main::DEBUG
1392 20 0 if @_ > 2
1395 0 20 unless $minlen <= $maxlen
1403 0 0 wantarray ? :
0 20 unless $maxlen
1412 0 20 unless $word
1414 0 20 wantarray ? :
1429 20 0 if @_ > 2
1446 20 0 if @_ > 2
1467 0 40 unless $minlen <= $maxlen
1479 0 40 if length $s > $string_size
1580 3 57 unless ($Crypt::RandPasswd::initialized)
1584 0 3 if (defined $Crypt::RandPasswd::seed) { }
1638 109 6 unless (_improper_word @word_units, @syllable_units or $word eq '' and _have_initial_y @syllable_units or length $word . $new_syllable == $pwlen and _have_final_split @syllable_units)
1662 0 115 if ($tries > $max_retries)
1716 0 22013 $type & 2 ? :
1756 0 279 if $unit_count > 0 and $digram{$units[$unit_count - 1]}{$units[$unit_count]} & 8
1760 203 76 if $unit_count < 2
1772 0 76 if $rules{$units[$unit_count - 2]} & 2 and not $rules{$units[$unit_count - 2]} & 1 and $rules{$units[$unit_count - 1]} & 2 and $rules{$units[$unit_count]} & 2 or not $rules{$units[$unit_count - 2]} & 2 || $rules{$units[$unit_count - 1]} & 2 || $rules{$units[$unit_count]} & 2
1818 27 47 if ($rules{$units[$unit_count]} & 2)
1826 27 0 if (not $rules{$units[$unit_count]} & 1 or $unit_count > 0)
1832 13 7 if $vowel_count <= 1
1856 31 9 if ($rules{$units[$unit_count]} & 2)
1864 22 4 if $vowel_count == 1
1976 264 22201 if (@Crypt::RandPasswd::saved_pair == 2)
1979 0 264 if $rules{$syllable} & 2
1984 452 22013 if (@Crypt::RandPasswd::saved_pair) { }
2001 0 22013 $want_vowel ? :
2016 266 22199 if ($current_unit == 0) { }
2020 0 266 if ($rules{$unit} & 8) { }
34 232 elsif ($length_left == 0) { }
2029 15 19 if ($rules{$unit} & 2) { }
2051 3446 28 if (ALLOWED(8) or ALLOWED(32) and $vowel_count == 0 or ALLOWED(2) and $vowel_count == 0 and not $rules{$unit} & 2)
2080 658 21541 if ($current_unit == 1) { }
2085 124 534 if (ALLOWED(64))
2103 17421 388 if ($current_unit == 2 and ALLOWED(128) and $rules{$units_in_syllable[0]} & 1 or ALLOWED(1) and $length_left == 0 or (ALLOWED(32) or $digram{$units_in_syllable[$current_unit - 2]}{$last_unit} & 1) or ALLOWED(16) and not $rules{$units_in_syllable[$current_unit - 2]} & 2)
2153 183 0 if (not $rule_broken and $rules{$unit} & 2 and $length_left > 0 || !($rules{$last_unit} & 4))
2168 12 171 if ($vowel_count > 1 and $rules{$last_unit} & 2) { }
160 12 elsif ($vowel_count != 0 and not $rules{$last_unit} & 2) { }
2183 0 160 if ($digram{$units_in_syllable[$current_unit - 2]}{$last_unit} & 1) { }
2201 680 21519 if (not $rule_broken and $want_another_unit)
2205 24 656 if ($vowel_count != 0 and $rules{$unit} & 4 and $length_left == 0 and not $rules{$last_unit} & 2 or (ALLOWED(2) or $length_left == 0)) { }
341 315 elsif ($vowel_count != 0 and $length_left > 0) { }
154 161 elsif (ALLOWED(4)) { }
2244 15 326 if (ALLOWED(128) and $current_unit > 1 and not $vowel_count == 1 && $rules{$last_unit} & 2) { }
2 324 elsif (ALLOWED(32)) { }
2275 21381 1084 if ($rule_broken)
2284 1084 292 if ($tries <= $max_retries) { }
2291 446 14 if ($rules{$unit} & 2 and $current_unit > 0 || !($rules{$unit} & 1))
2303 15 1069 if (@Crypt::RandPasswd::saved_pair == 2) { }
162 907 elsif (@Crypt::RandPasswd::saved_pair == 1) { }
2332 5 110 if $outer_tries >= $max_retries
2358 0 0 if length $syl >= $pwlen
2360 0 0 if @syl_units
2386 75 723 if $failure
2388 508 215 if ($unit_count >= 1)
2393 105 173 if (not $rules{$units[$unit_count - 1]} & 2 and $rules{$units[$unit_count]} & 2 and not $rules{$units[$unit_count]} & 4 && $unit_count == $#units and $vowel_count or $unit_count >= 2 and !($rules{$units[$unit_count - 2]} & 2 || $rules{$units[$unit_count - 1]} & 2 || $rules{$units[$unit_count]} & 2) || $rules{$units[$unit_count - 2]} & 2 && !($rules{$units[0]} & 1 && $unit_count == 2) && $rules{$units[$unit_count - 1]} & 2 && $rules{$units[$unit_count]} & 2)
2448 258 465 if ($rules{$units[$unit_count]} & 2 and not $rules{$units[0]} & 1 && $unit_count == 0 && @units > 1)