line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::HTTP2::RejectorRegistry; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
177
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
2
|
|
|
2
|
0
|
6
|
return bless {}, shift; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub add { |
11
|
2
|
|
|
2
|
0
|
5
|
my ($self, $rejector) = @_; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
|
|
10
|
$self->{$rejector} = $rejector; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
7
|
return "$rejector"; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub remove { |
19
|
2
|
|
|
2
|
0
|
6
|
my ($self, $rejector_str) = @_; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
11
|
return delete $self->{$rejector_str}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub count { |
25
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return 0 + keys %$self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub reject_all { |
31
|
0
|
|
|
0
|
0
|
|
my ($self, $err) = @_; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
$_->($err) for values %$self; |
34
|
0
|
|
|
|
|
|
%$self = (); |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |