Branch Coverage

blib/lib/Term/DBPrompt.pm
Criterion Covered Total %
branch 45 88 51.1


line true false branch
61 1 0 if (defined $opt_file)
64 0 1 if (defined $opt_argv and $opt_argv =~ /\S/msx)
67 0 1 if (not @pipe or $opt_interact)
117 0 26 unless (@commands)
122 0 26 if ($opt_prompt)
123 0 0 unless ($inp_typ eq 'i' and $tty_in)
132 26 2 unless (defined $extracted)
134 21 5 if $line =~ /\S/msx
142 2 0 if $prefix =~ /\S/msx
148 5 21 unless (@words)
156 1 20 if (@candidates > 1)
160 17 3 if (@candidates == 1)
170 1 23 unless (defined $inp_tok)
171 0 1 unless ($inp_prv eq '')
177 0 1 unless (@pipe)
185 1 0 if ($inp_typ eq 'f')
186 0 1 unless open $inp_fhd, '<', $$inp_tok[1]
193 0 1 if ($inp_ctr == 1 and $inp_typ eq 'i' and $tty_in)
200 0 24 unless (defined $inp_dat)
209 3 21 unless ($inp_prv eq '')
223 0 0 if ($tty_in and not $tty_out)
226 0 0 if ($tty_in)
230 0 0 unless (defined $inp_dat)
236 0 0 if (not $tty_in and $opt_prompt)
240 0 0 unless ($inp_prv eq '')
254 5 19 unless ($inp_dat =~ /\S/msx)
267 19 2 unless (defined $extracted)
277 1 18 if ($line =~ /\A ([^\#]*) \#/msx)
282 19 0 unless ($inp_fin)
283 19 0 if ($inp_typ eq 'f' or $inp_typ eq 'i' and not $tty_in)
285 16 3 if ($line =~ s/; ([^;]*) \z/;/msx) { }
302 21 0 if /\S/msx
307 16 5 $i == 0 ? :
308 16 5 $i == $last ? :
317 10 11 if grep {$_ eq $word;} @cmd_available
324 9 57 if (substr($c, 0, $len) eq $word)
337 0 0 unless seek $page_fh, 0, 0
338 0 0 unless truncate $page_fh, 0
342 0 0 unless seek $page_fh, 0, 0
346 0 0 if ($inp_typ eq 'i' and $tty_in) { }
0 0 elsif (not $opt_quiet) { }
347 0 0 unless open $out_fh, '|-', 'more'
350 0 0 unless open $out_fh, '>&STDOUT'
353 0 0 if (defined $out_fh)