Branch Coverage

blib/lib/Crypt/RandPasswd.pm
Criterion Covered Total %
branch 90 116 77.5


line true false branch
1375 0 204 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 98 4 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 102 if ($tries > $max_retries)
1716 0 7703 $type & 2 ? :
1757 0 260 if $unit_count > 0 and $digram{$units[$unit_count - 1]}{$units[$unit_count]} & 8
1760 187 73 if $unit_count < 2
1789 0 73 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 21 47 if ($rules{$units[$unit_count]} & 2)
1826 21 0 if (not $rules{$units[$unit_count]} & 1 or $unit_count > 0)
1832 19 1 if $vowel_count <= 1
1856 27 14 if ($rules{$units[$unit_count]} & 2)
1864 21 3 if $vowel_count == 1
1976 74 7814 if (@Crypt::RandPasswd::saved_pair == 2)
1979 0 74 if $rules{$syllable} & 2
1984 185 7703 if (@Crypt::RandPasswd::saved_pair) { }
2001 0 7703 $want_vowel ? :
2016 177 7711 if ($current_unit == 0) { }
2020 2 175 if ($rules{$unit} & 8) { }
27 148 elsif ($length_left == 0) { }
2029 13 14 if ($rules{$unit} & 2) { }
2051 2517 16 if (ALLOWED(8) or ALLOWED(32) and $vowel_count == 0 or ALLOWED(2) and $vowel_count == 0 and not $rules{$unit} & 2)
2080 376 7335 if ($current_unit == 1) { }
2085 138 238 if (ALLOWED(64))
2103 4288 231 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 108 1 if (not $rule_broken and $rules{$unit} & 2 and $length_left > 0 || !($rules{$last_unit} & 4))
2168 6 102 if ($vowel_count > 1 and $rules{$last_unit} & 2) { }
94 8 elsif ($vowel_count != 0 and not $rules{$last_unit} & 2) { }
2183 0 94 if ($digram{$units_in_syllable[$current_unit - 2]}{$last_unit} & 1) { }
2201 331 7380 if (not $rule_broken and $want_another_unit)
2205 26 305 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)) { }
181 124 elsif ($vowel_count != 0 and $length_left > 0) { }
78 46 elsif (ALLOWED(4)) { }
2244 2 179 if (ALLOWED(128) and $current_unit > 1 and not $vowel_count == 1 && $rules{$last_unit} & 2) { }
2 177 elsif (ALLOWED(32)) { }
2275 7304 584 if ($rule_broken)
2284 584 96 if ($tries <= $max_retries) { }
2291 262 17 if ($rules{$unit} & 2 and $current_unit > 0 || !($rules{$unit} & 1))
2303 2 582 if (@Crypt::RandPasswd::saved_pair == 2) { }
96 486 elsif (@Crypt::RandPasswd::saved_pair == 1) { }
2332 1 101 if $outer_tries >= $max_retries
2358 0 0 if length $syl >= $pwlen
2360 0 0 if @syl_units
2386 0 404 if $failure
2388 267 137 if ($unit_count >= 1)
2393 36 74 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 152 252 if ($rules{$units[$unit_count]} & 2 and not $rules{$units[0]} & 1 && $unit_count == 0 && @units > 1)