Branch Coverage

blib/lib/DBI/Shell/Completion.pm
Criterion Covered Total %
branch 2 88 2.2


line true false branch
49 4 0 if exists $sh->{'home_dir'} and defined $sh->{'home_dir'}
56 4 0 unless $sh->{'term'}
67 0 0 if ($term->ReadLine eq 'Term::ReadLine::Gnu')
80 0 0 if (-e $pi->{'history'}) { }
82 0 0 unless $term->ReadHistory($pi->{'history'})
85 0 0 unless open HISTORY, "> $pi->{'history'}"
128 0 0 unless $list
129 0 0 unless exists $loa->{$list}
133 0 0 if (@_)
161 0 0 unless (defined $loa->{'sql_keywords'})
166 0 0 unless defined $key_words
168 0 0 unless @key_words
170 0 0 unless defined $loa->{'sql_keywords'}
173 0 0 if ($@)
178 0 0 unless (defined $loa->{'columns'})
181 0 0 unless $sth
184 0 0 if defined $row->[0]
185 0 0 if defined $row->[1]
186 0 0 if defined $row->[2]
187 0 0 if defined $row->[3]
201 0 0 if ($start == 0) { }
0 0 elsif ($line =~ / \bfrom(?:\s*)?(?:['"])?$ | \bfrom(?:\s*)(?:['"])?(?:[\w.]+) | \binsert\s+into(?:\s+)?$ | \binsert\s+into\s+(?:['"])?(?:\w+|[\w+.]|\w+\.\w+)$ | \bupdate(?:\s*)?(?:['"])?(?:\w+)?$ | ^${cmd_p}desc(?:\s*)?(?:['"])?(?:\w+)? /xi) { }
0 0 elsif ($line =~ /select\s+?$|select\s+\w+?$/i) { }
0 0 elsif ($line =~ / ^insert\s+ into\s+ ((?:\w+|\w+\.\w+))\s+?\( # ) /xi) { }
224 0 0 unless $loa->{'tables'}
240 0 0 unless (exists $loa->{'ntables'}{$tbl_nm})
243 0 0 unless $sth
249 0 0 if ($@)
259 0 0 unless ($sth->err)
296 0 0 unless ($state)
305 0 0 if $columns[$list_index - 1] =~ /^$text/i
320 0 0 unless ($state)
322 0 0 if (exists $loa->{'ntables'}{$tbl_nm}) { }
334 0 0 if $columns[$list_index - 1] =~ /^$text/i
347 0 0 unless ($state)
356 0 0 if $name[$list_index - 1] =~ /^$text/i
369 0 0 unless ($state)
378 0 0 if $name[$list_index - 1] =~ /^$text/i
395 0 0 unless ($state)
404 0 0 if $tables[$list_index - 1] =~ /^$text/i
415 0 0 if ($term and $term->ReadLine eq 'Term::ReadLine::Gnu')
416 0 0 if ($term and $term->history_total_bytes)
418 0 0 if ($history)
419 0 0 unless ($term->WriteHistory($history))