Branch Coverage

blib/lib/Term/ReadLine/Zoid.pm
Criterion Covered Total %
branch 65 214 30.3


line true false branch
13 10 0 unless (caller())[0] eq 'Term::ReadLine' and $] < 5.008
105 0 9 if -e $_
109 0 3 if ($rcfile)
115 2 1 if (exists $ENV{'PERL_RL'})
117 2 0 if (UNIVERSAL::isa($self, "Term::ReadLine::$which"))
119 0 0 unless /(\w+)=(.*)/
131 0 7 if $Term::ReadLine::Zoid::AUTOLOAD eq 'DESTROY'
133 7 0 if ($Term::ReadLine::Zoid::AUTOLOAD =~ /^switch_mode_(.*)/) { }
0 0 elsif ($$self{'class'} ne 'Term::ReadLine::Zoid') { }
156 0 0 defined $prompt ? :
157 0 0 if defined $preput
161 0 0 if ($$self{'prev_hist_p'})
172 0 0 unless defined $$self{'_loop'}
173 0 0 unless length $$self{'_loop'}
175 0 0 if $$self{'config'}{'autohistory'}
177 0 0 if $$self{'config'}{'comment_begin'} and not grep({not $_ =~ /^\s*\Q$$self{'config'}{'comment_begin'}\E/;} @{$$self{'lines'};})
178 0 0 if $$self{'config'}{'automultiline'}
185 0 0 unless defined $$self{'config'}{'minline'}
186 0 0 unless length $line and length $line > $$self{'config'}{'minline'}
219 0 0 wantarray ? :
225 0 0 ref $_[0] ? :
233 0 0 if $$self{'history'}[0] eq join("\n", @{$$self{'lines'};})
242 0 0 if $_current
251 0 3 if $key =~ /^[mM]-(.)$/
252 2 1 if $key =~ /^(?:\^|[cC]-)(.)$/
253 1 2 unless ref $sub
267 0 0 if $pos[0] > length $lines[$pos[1]]
272 0 0 if ($_ == $pos[1])
276 0 0 $ord < 32 ? :
283 0 0 $ord < 32 ? :
288 0 0 ref $$self{'prompt'} ? :
289 0 0 $1 ? :
293 0 0 defined $ENV{'CLICOLOR'} && !$ENV{'CLICOLOR'} ? :
295 0 0 if (@lines > 1)
296 0 0 ref $$self{'config'}{'PS2'} ? :
297 0 0 if ($$self{'config'}{'nu'}) { }
300 0 0 if $pos[1]
304 0 0 if $pos[1]
310 0 0 if (@prompt)
311 0 0 if $$self{'config'}{'nu'}
312 0 0 unless $pos[1]
315 0 0 if @prompt
319 0 0 if (my $rprompt = $$self{'config'}{'RPS1'})
320 0 0 if ref $rprompt
322 0 0 if ($rprompt and $l < $$self{'term_size'}[0])
341 0 42 unless ($$self{'keymaps'}{$mode})
346 2 40 if (my $class = delete $$self{'keymaps'}{$mode}{'_use'}) { }
348 0 2 if ($@)
355 2 0 if UNIVERSAL::can($class, 'keymap')
365 31 11 if (exists $$self{'keymaps'}{$mode}{'_on_switch'})
367 0 31 ref $sub ? :
402 0 2 unless $$a[1] <=> $$b[1]
26 7 if $end
405 26 7 if ($end)
406 24 2 if $$end[1] == $$start[1]
410 1 32 unless defined $buffer
412 32 0 unless ref $buffer
413 23 9 unless @$buffer
425 18 41 if $$pos[1]
436 1 3 if (not defined $$self{'hist_p'}) { }
2 1 elsif ($$self{'hist_p'} < $#{$$self{'history'};}) { }
437 0 1 unless scalar @{$$self{'history'};}
450 1 3 unless defined $$self{'hist_p'}
451 1 2 if ($$self{'hist_p'} == 0) { }
462 0 5 if $hist_p < 0 or $$self{'hist_p'} > $#{$$self{'history'};}
473 0 7 if $$self{'pos'}[0] > length $$self{'lines'}[$$self{'pos'}[1]]
482 0 0 if ($$self{'config'}{'automultiline'} and scalar @{$$self{'lines'};} and not grep(/\\\\$|(?
501 0 0 length join("\n", @{$_[0]{'lines'};}) ? :
513 1 10 if ($$self{'pos'}[0] >= length $$self{'lines'}[$$self{'pos'}[1]]) { }
515 0 1 unless $$self{'pos'}[1] < @{$$self{'lines'};}
525 0 0 if ($$self{'pos'}[1] == $#{$$self{'lines'};} and not length $$self{'lines'}[-1]) { }
528 0 0 $$self{'pos'}[1] ? :
534 9 0 unless $_[0]{'replace'}
551 0 0 if ($$self{'completions'} and @{$$self{'completions'};})
558 0 0 exists $$self{'config'}{'completion_function'} ? :
561 0 0 unless $func
562 0 0 unless (ref $func)
565 0 0 unless ref $func
577 0 0 ref $compl[0] ? :
578 0 0 if $$meta{'message'}
580 0 0 unless @compl
581 0 0 if ($compl[0] eq $compl[-1]) { }
587 0 0 unless @compl
588 0 0 unless ($$meta{'quoted'})
589 0 0 if ($$meta{'quote'}) { }
590 0 0 if (ref $$meta{'quote'}) { }
592 0 0 $1 ? :
0 0 if $$meta{'quote'}
593 0 0 if not @compl and $compl =~ /\w$/
596 0 0 $1 ? :
597 0 0 if not @compl and $compl =~ /\w$/
601 0 0 if (@compl)
602 0 0 if ($$self{'config'}{'autolist'} or $preview) { }
604 0 0 if $preview
610 0 0 if length $compl
627 0 0 if ($_ eq $prev) { }
635 0 0 $b ? :
641 4 35 if ($$self{'pos'}[0] >= length $$self{'lines'}[$$self{'pos'}[1]]) { }
642 2 2 unless $$self{'pos'}[1] < $#{$$self{'lines'};}
654 4 45 if ($$self{'pos'}[0] == 0) { }
4 41 elsif ($$self{'pos'}[0] >= length $$self{'lines'}[$$self{'pos'}[1]]) { }
655 2 2 if $$self{'pos'}[1] == 0
678 0 2 if $$self{'pos'}[0] > length $$self{'lines'}[$$self{'pos'}[1]]
701 2 2 unless $$self{'pos'}[1] > 0
708 2 2 unless $$self{'pos'}[1] < $#{$$self{'lines'};}
717 0 0 if $$self{'pos'}[1] < 0
725 0 0 if $$self{'pos'}[1] > $#{$$self{'lines'};}