Branch Coverage

blib/lib/Term/Cap.pm
Criterion Covered Total %
branch 99 124 79.8


line true false branch
87 0 7 $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos' ? :
1 6 if exists $ENV{'TERMCAP'} and $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos' ? $ENV{'TERMCAP'} =~ m[^[a-z]:[\\/]]is : $ENV{'TERMCAP'} =~ m[^/]s
90 6 2 if (exists $ENV{'TERMPATH'} and $ENV{'TERMPATH'}) { }
101 1 1 exists $ENV{'HOME'} ? :
106 76 1 if defined $_
170 1 7 unless defined $self
178 2 6 unless ($self->{'OSPEED'})
180 1 1 if ($^W)
186 5 3 if ($self->{'OSPEED'} < 16) { }
201 5 3 unless ($self->{'TERM'})
203 1 4 if ($ENV{'TERM'}) { }
209 1 3 if ($^O eq 'MSWin32') { }
229 4 1 exists $ENV{'TERMCAP'} ? :
232 0 5 if (not $foo =~ m[^/]s and $foo =~ /(^|\|)$Term::Cap::termpat[:|]/s)
239 2 0 unless (@termcap_path or $Term::Cap::entry)
245 0 2 if ($^O eq 'VMS') { }
251 1 1 if (grep {-x "$_/infocmp";} split(/:/, $ENV{'PATH'}, 0)) { }
256 0 1 if (not $tmp =~ m[^/]s and $tmp =~ /(^|\|)$Term::Cap::termpat[:|]/s)
262 0 1 if $@
267 1 0 if ($self->{'TERM'} eq 'dumb')
275 1 1 unless @termcap_path or $Term::Cap::entry
285 1 3 if ($Term::Cap::entry)
291 0 1 if ($Term::Cap::entry =~ s/:tc=([^:]+):/:/) { }
326 4 33 if ($Term::Cap::state == 1) { }
338 1 32 unless $max--
342 0 35 unless open TERMCAP, "< $TERMCAP\000"
344 0 35 if $@
348 33 2 if $Term::Cap::entry =~ s/:tc=([^:]+):/:/
355 0 2 if $Term::Cap::entry eq ''
365 3 8 if (defined $field and $field =~ /^(\w{2,})$/) { }
1 7 elsif (defined $field and $field =~ /^(\w{2,})\@/) { }
2 5 elsif (defined $field and $field =~ /^(\w{2,})#(.*)/) { }
5 0 elsif (defined $field and $field =~ /^(\w{2,})=(.*)/) { }
367 3 0 unless defined $$self{'_' . $1}
379 2 0 unless defined $$self{'_' . $1}
387 0 5 if defined $$self{'_' . ($cap = $1)}
424 2 0 unless defined $self->{'_pc'}
425 2 0 unless defined $self->{'_bc'}
466 2 15 if (defined $string and $string =~ /(^[\d.]+)(\*?)(.*)$/)
469 2 0 if $2
472 2 0 if ($decr > 0.1)
478 1 16 if $FH
518 1 2 unless $cnt
520 1 2 if ($cnt > 1) { }
528 1 1 unless (exists $self->{$cap})
532 1 0 exists $$self{"_$cap"} ? :
537 1 2 if $FH
610 2 12 if ($code eq 'd') { }
2 10 elsif ($code eq '.') { }
3 7 elsif ($code eq '+') { }
1 6 elsif ($code eq 'r') { }
1 5 elsif ($code eq '>') { }
2 3 elsif ($code eq '2') { }
1 2 elsif ($code eq '3') { }
1 1 elsif ($code eq 'i') { }
617 0 1 if ($tmp == 0 or $tmp == 4 or $tmp == 10)
619 0 1 if ($online) { }
621 0 0 if $self->{'_up'}
646 0 1 if ($tmp[0] > $code)
672 1 10 if $FH
692 1 1 unless defined $$self{'_' . $cap} and $$self{'_' . $cap}
694 1 1 if @undefined