line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sub::Rate::NoMaxRate; |
2
|
1
|
|
|
1
|
|
68460
|
use strict; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
585
|
use Moo; |
|
1
|
|
|
|
|
13270
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1645
|
use List::Util 'sum'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
252
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'Sub::Rate'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has '+max_rate' => 'default' => 0; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
before add => sub { |
13
|
|
|
|
|
|
|
my ($self, $rate) = @_; |
14
|
|
|
|
|
|
|
$self->max_rate($self->max_rate + $rate); |
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
after clear => sub { |
18
|
|
|
|
|
|
|
my ($self) = @_; |
19
|
|
|
|
|
|
|
$self->max_rate(0); |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |