line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::LCDproc::Widget::Scroller; |
2
|
|
|
|
|
|
|
$Net::LCDproc::Widget::Scroller::VERSION = '0.1.3'; |
3
|
|
|
|
|
|
|
#ABSTRACT: 'scroller' widget |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
12
|
use v5.10.2; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
6
|
1
|
|
|
1
|
|
4
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
7
|
1
|
|
|
1
|
|
319
|
use Types::Standard qw/Enum Int Str/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
8
|
1
|
|
|
1
|
|
794
|
use namespace::sweep; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Net::LCDproc::Widget'; |
11
|
|
|
|
|
|
|
with 'Net::LCDproc::Role::Widget'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has text => ( |
14
|
|
|
|
|
|
|
is => 'rw', |
15
|
|
|
|
|
|
|
isa => Str, |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
trigger => \&_set_attr, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has direction => ( |
21
|
|
|
|
|
|
|
is => 'rw', |
22
|
|
|
|
|
|
|
isa => Enum([qw/h v m/]), |
23
|
|
|
|
|
|
|
required => 1, |
24
|
|
|
|
|
|
|
trigger => \&_set_attr, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has ['left', 'right', 'top', 'bottom', 'speed'] => ( |
28
|
|
|
|
|
|
|
is => 'rw', |
29
|
|
|
|
|
|
|
isa => Int, |
30
|
|
|
|
|
|
|
required => 1, |
31
|
|
|
|
|
|
|
trigger => \&_set_attr, |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has '+_set_cmd' => |
35
|
|
|
|
|
|
|
(default => sub { [qw/ left top right bottom direction speed text /] },); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |