line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AnyEvent::JSONRPC::Lite::CondVar; |
2
|
9
|
|
|
9
|
|
53
|
use Any::Moose; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
55
|
|
3
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
4320
|
use AnyEvent; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
649
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has _cv => ( |
7
|
|
|
|
|
|
|
is => 'ro', |
8
|
|
|
|
|
|
|
isa => 'AnyEvent::CondVar', |
9
|
|
|
|
|
|
|
default => sub { |
10
|
|
|
|
|
|
|
AnyEvent->condvar; |
11
|
|
|
|
|
|
|
}, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
9
|
|
|
9
|
|
49
|
no Any::Moose; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
48
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _cb { |
17
|
12
|
|
|
12
|
|
30
|
my ($self, $cb) = @_; |
18
|
12
|
|
|
|
|
79
|
$self->_cv->cb($cb); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub result { |
22
|
11
|
|
|
11
|
1
|
821361
|
my ($self, @result) = @_; |
23
|
11
|
|
|
|
|
129
|
$self->_cv->send( result => @result); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub error { |
27
|
1
|
|
|
1
|
1
|
7
|
my ($self, @error) = @_; |
28
|
1
|
|
|
|
|
5
|
$self->_cv->send( error => @error); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |