Branch Coverage

blib/lib/Games/Roguelike/Console/ANSI.pm
Criterion Covered Total %
branch 12 138 8.7


line true false branch
67 0 2 unless $pkg
80 1 1 unless $$self{'in'} = $opt{'in'}
81 1 1 unless $$self{'out'} = $opt{'out'}
92 0 2 if (not $opt{'noinit'})
102 0 0 if ($$self{'usereadkey'})
110 0 0 unless ($$self{'winx'})
126 0 0 if ($$self{'out'}->fileno == 1)
131 0 0 unless $$self{'speed'}
150 0 0 unless $$self{'cursor'}
169 0 0 if $^S
176 0 5 if ($STD)
181 5 0 if ($^O =~ /linux|darwin/)
182 0 5 if (my $tty = POSIX::ttyname(1))
190 1 0 if ($$self{'out'} and fileno $$self{'out'})
192 1 0 if ($$self{'out'}->fileno and $$self{'out'}->fileno == 1)
204 0 0 if (@_ == 1) { }
214 0 0 if ($c eq '<')
220 0 0 if ($attr eq 'gt') { }
0 0 elsif ($attr eq 'lt') { }
230 0 0 if ($c eq "\r")
233 0 0 if ($c eq "\n")
251 2 0 if ($color) { }
276 0 0 if (@_ == 0) { }
0 0 elsif (@_ == 2) { }
279 0 0 if ($c eq "\n")
293 0 0 if ($c eq "\n")
310 0 0 if $r < 0
311 0 0 if $t < 0
312 0 0 if $b > $$self{'winy'}
313 0 0 if $r > $$self{'winx'}
315 0 0 if ($r < $l)
320 0 0 if ($b < $t)
325 0 0 if $l < $$self{'invl'}
326 0 0 if $r > $$self{'invr'}
327 0 0 if $t < $$self{'invt'}
328 0 0 if $b > $$self{'invb'}
341 0 0 unless ($$self{'buf'}[$y][$x][0] eq $$self{'cur'}[$y][$x][0] and $$self{'buf'}[$y][$x][1] eq $$self{'cur'}[$y][$x][1])
354 0 0 unless ($pattr eq $$self{'buf'}[$y][$x][0])
382 0 0 if ($$self{'cursor'} and not $$self{'cx'} == $$self{'scx'} && $$self{'cx'} == $$self{'scy'})
394 0 0 if ($set and not $$self{'cursor'}) { }
0 0 elsif (not $set and $$self{'cursor'}) { }
412 0 0 if ($$self{'usereadkey'}) { }
413 0 0 $time ? :
416 0 0 unless sysread $$self{'in'}, $c, 1
424 0 0 if ($c eq $KEY_UP) { }
0 0 elsif ($c eq $KEY_DOWN) { }
0 0 elsif ($c eq $KEY_LEFT) { }
0 0 elsif ($c eq $KEY_RIGHT) { }
0 0 elsif ($c eq "\cH") { }
443 0 0 if ($$self{'cbuf'}) { }
450 0 0 if ($c eq $KEY_ESCAPE)
452 0 0 if ($c eq '[') { }
0 0 elsif ($c eq $KEY_NOOP) { }
0 0 elsif ($c eq $KEY_ESCAPE) { }
472 0 0 if (length $$self{'cbuf'} > 0) { }
476 0 0 if ($$self{'usereadkey'}) { }
490 0 0 if ($c eq $KEY_ESCAPE) { }
0 0 elsif (ord $c == 255) { }
492 0 0 if (not defined $c2) { }
0 0 elsif ($c2 eq '[') { }
0 0 elsif ($c2 eq $KEY_NOOP) { }
0 0 elsif ($c2 eq $KEY_ESCAPE) { }
501 0 0 if defined $ct
504 0 0 if (not defined $ct) { }
515 0 0 if ord $c > 240
519 0 0 if (not defined $c2) { }
0 0 elsif ($TELKEY{$c2}) { }
525 0 0 if (not defined $c3) { }
532 0 0 if ord $c > 240