line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Image::Caa::DriverTest;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
310
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new {
|
7
|
5
|
|
|
5
|
0
|
12
|
my ($class, $args) = @_;
|
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
|
|
15
|
my $self = bless {}, $class;
|
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
|
|
35
|
return $self;
|
12
|
|
|
|
|
|
|
}
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init {
|
15
|
5
|
|
|
5
|
0
|
7
|
my ($self) = @_;
|
16
|
|
|
|
|
|
|
|
17
|
5
|
|
|
|
|
44
|
$self->{color} = '';
|
18
|
5
|
|
|
|
|
15
|
$self->{data} = {};
|
19
|
5
|
|
|
|
|
17
|
$self->{buffer} = '';
|
20
|
|
|
|
|
|
|
}
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub set_color{
|
23
|
20
|
|
|
20
|
0
|
29
|
my ($self, $fg, $bg) = @_;
|
24
|
|
|
|
|
|
|
|
25
|
20
|
|
|
|
|
50
|
$self->{color} = "$fg:$bg";
|
26
|
20
|
|
|
|
|
63
|
$self->{buffer} .= "($fg:$bg)";
|
27
|
|
|
|
|
|
|
}
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub putchar{
|
30
|
20
|
|
|
20
|
0
|
34
|
my ($self, $x, $y, $outch) = @_;
|
31
|
|
|
|
|
|
|
|
32
|
20
|
|
|
|
|
90
|
$self->{data}->{"$x,$y"} = "$self->{color}:$outch";
|
33
|
20
|
|
|
|
|
47
|
$self->{buffer} .= $outch;
|
34
|
|
|
|
|
|
|
}
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub fini {
|
37
|
5
|
|
|
5
|
0
|
48
|
my ($self) = @_;
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |