line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ZMQ::CZMQ; |
2
|
4
|
|
|
4
|
|
127495
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
748
|
|
3
|
|
|
|
|
|
|
our $VERSION = '1.04'; |
4
|
|
|
|
|
|
|
our $BACKEND; |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
4
|
|
33
|
4
|
|
43
|
$BACKEND ||= $ENV{PERL_ZMQ_CZMQ_BACKEND}; |
7
|
4
|
50
|
|
|
|
24
|
if ( $BACKEND ) { |
8
|
0
|
|
|
|
|
0
|
eval "require $BACKEND"; |
9
|
0
|
0
|
|
|
|
0
|
if ($@) { |
10
|
0
|
|
|
|
|
0
|
die $@; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
} else { |
13
|
4
|
|
|
|
|
12
|
foreach my $lib ( qw(ZMQ::LibCZMQ1) ) { |
14
|
4
|
|
|
|
|
289
|
eval "require $lib"; |
15
|
4
|
50
|
|
|
|
30
|
if ($@) { |
16
|
4
|
|
|
|
|
16
|
next; |
17
|
|
|
|
|
|
|
} |
18
|
0
|
|
|
|
|
0
|
$BACKEND = $lib; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
4
|
50
|
|
|
|
25
|
if (! $BACKEND) { |
23
|
4
|
|
|
|
|
171
|
die "Could not find a suitable backend for ZMQ::CZMQ"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub call { |
28
|
|
|
|
|
|
|
my $funcname = shift; |
29
|
|
|
|
|
|
|
no strict 'refs'; |
30
|
|
|
|
|
|
|
goto &{"${BACKEND}::$funcname"}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use ZMQ::CZMQ::Zctx; |
34
|
|
|
|
|
|
|
use ZMQ::CZMQ::Zframe; |
35
|
|
|
|
|
|
|
use ZMQ::CZMQ::Zmsg; |
36
|
|
|
|
|
|
|
use ZMQ::CZMQ::Zsocket; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |