Branch Coverage

blib/lib/Games/Cryptoquote.pm
Criterion Covered Total %
branch 45 68 66.1


line true false branch
39 1 2 if @_
46 1 2 if @_
53 1 1 if @_
61 0 1 if @_ % 2
64 0 1 if @bad_opts
69 0 1 if ($type eq 'dict') { }
1 0 elsif ($type eq 'patterns') { }
71 0 0 if (open DICT, "$file") { }
91 1 0 if (open DICT, "$file") { }
123 0 0 if @_ % 2
126 0 0 if @bad_opts
135 0 0 if (-e $pattern_file)
141 0 0 unless open PATTERNS, ">$pattern_file"
163 0 1 unless $timeout =~ /^\d+$/
176 0 12 if exists $$self{'word_word'}{$_}
186 1 3 if ($current_num_poss == $last_num_poss or $current_num_poss == 0)
189 1 0 unless ($quote_soln =~ /\|/)
200 0 3 if ($timeout and time - $time_in > $timeout)
232 0 48 if $#temp == -1
258 13909 19397 if exists $$self{'bad_let_let'}{substr $word1, $i, 1}{substr $word2, $i, 1}
278 537 3635 unless (exists $$self{'let_word_let'}{$char1}{$word1}{$char2})
301 183 45 if ($#chars2 == 0)
307 9590 841 unless exists $$self{'word_let_let_word'}{$word3}{$char3}{$chars2[0]}
308 690 151 if ($char1 eq $char3) { }
310 15 675 if (scalar keys %{$$self{'word_let_let_word'}{$word3}{$char3};} > 1)
346 1277 10252 if exists $$self{'word_let_let_word'}{$word1}{$char1}{$char2}{$word2}
364 8 57 if ($string =~ /$chars[$i]/) { }
384 0 2 unless ref $mapping_ref eq 'HASH'
403 70 20 if ($crypt_char =~ /^[a-z]$/) { }
4 16 elsif ($crypt_char =~ /^[A-Z]$/) { }
420 0 40 unless $mapping{$letter}
425 74 1726 if (substr($ciphertext, $j, 1) =~ /^$letter$/i)
435 4 70 if ($new_chars[$index] eq '#') { }
456 0 2 unless $type =~ /^(quote|source)$/