line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Device::WallyHome::Sensor::Threshold; |
2
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
3
|
1
|
|
|
1
|
|
5353
|
use MooseX::AttributeShortcuts; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
4
|
1
|
|
|
1
|
|
2810
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.21.2'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#== ATTRIBUTES ================================================================= |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'name' => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'Str', |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
writer => '_name', |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has 'min' => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
isa => 'Maybe[Num]', |
21
|
|
|
|
|
|
|
required => 1, |
22
|
|
|
|
|
|
|
writer => '_min', |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'max' => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
isa => 'Maybe[Num]', |
28
|
|
|
|
|
|
|
required => 1, |
29
|
|
|
|
|
|
|
writer => '_max', |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#== PUBLIC METHODS ============================================================= |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub asArrayRef { |
36
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
return [ |
39
|
0
|
|
|
|
|
|
$self->min(), |
40
|
|
|
|
|
|
|
$self->max(), |
41
|
|
|
|
|
|
|
]; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub asHref { |
45
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
return { |
48
|
0
|
|
|
|
|
|
min => $self->min(), |
49
|
|
|
|
|
|
|
max => $self->max(), |
50
|
|
|
|
|
|
|
}; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |