Branch Coverage

blib/lib/Text/TypingEffort.pm
Criterion Covered Total %
branch 52 52 100.0


line true false branch
217 5 31 if (@_ == 1) { }
223 1 35 unless defined $opts{'file'} or defined $opts{'text'}
226 1 35 unless defined $opts{'caps'}
227 1 35 if $opts{'caps'} == 1
231 16 20 unless $basis{'LAYOUT'} and $basis{'LAYOUT'} eq $opts{'layout'}
237 3 33 if (defined $opts{'file'}) { }
6 27 elsif (ref $opts{'text'}) { }
238 1 2 if (ref $opts{'file'}) { }
241 1 1 unless open $fh, "<$opts{'file'}"
254 2 33 if ($fh) { }
265 4 31 if $opts{'unknowns'}
268 3 32 if (ref $opts{'initial'} eq 'HASH' and keys %{$opts{'initial'};})
270 6 3 if defined $opts{'initial'}{$_}
273 2 4 if defined $opts{'initial'}{'unknowns'}{$_}
279 64 41 if (chomp $line)
289 100 5 if ($opts{'caps'})
293 14 86 if (my $caps = $line =~ s/($p $d {$c,} $p)/\L$1\E/gx)
302 3425 51 if exists $basis{'presses'}{$_}
305 6850 102 if (defined $basis{$metric}{$_}) { }
20 82 elsif ($opts{'unknowns'}) { }
314 4 101 if ($fh) { }
317 70 31 if ($$text =~ /($line_rx)/cg) { }
325 1 34 if $close_fh
345 20 2 if exists $layouts{$name}
533 1 15 unless layout($desired)
554 400 352 $shift eq 'l' ? :