line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AnyEvent::MPRPC; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
564236
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
110
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
131
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.20'; |
6
|
3
|
|
|
3
|
|
7900
|
use AnyEvent::MPRPC::Server; |
|
3
|
|
|
|
|
299
|
|
|
3
|
|
|
|
|
123
|
|
7
|
3
|
|
|
3
|
|
1869
|
use AnyEvent::MPRPC::Client; |
|
3
|
|
|
|
|
275
|
|
|
3
|
|
|
|
|
106
|
|
8
|
3
|
|
|
3
|
|
20
|
use base 'Exporter'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
262
|
|
9
|
3
|
|
|
3
|
|
83
|
use 5.008; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
517
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT = qw/mprpc_client mprpc_server/; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub mprpc_client($$) { ## no critic |
14
|
1
|
|
|
1
|
1
|
35965
|
my ($host, $port) = @_; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
70
|
AnyEvent::MPRPC::Client->new( |
17
|
|
|
|
|
|
|
host => $host, |
18
|
|
|
|
|
|
|
port => $port, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub mprpc_server($$) { ## no critic |
23
|
0
|
|
|
0
|
1
|
|
my ($address, $port) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
AnyEvent::MPRPC::Server->new( |
26
|
|
|
|
|
|
|
address => $address, |
27
|
|
|
|
|
|
|
port => $port, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |