line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ZMQ::FFI::ContextBase; |
2
|
|
|
|
|
|
|
$ZMQ::FFI::ContextBase::VERSION = '0.17'; |
3
|
1
|
|
|
1
|
|
354
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
215
|
use namespace::autoclean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
60
|
use Carp; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
260
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with qw( |
9
|
|
|
|
|
|
|
ZMQ::FFI::ContextRole |
10
|
|
|
|
|
|
|
ZMQ::FFI::ErrorHandler |
11
|
|
|
|
|
|
|
ZMQ::FFI::Versioner |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# real underlying zmq ctx pointer |
15
|
|
|
|
|
|
|
has _ctx => ( |
16
|
|
|
|
|
|
|
is => 'rw', |
17
|
|
|
|
|
|
|
default => -1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub get { |
21
|
0
|
|
|
0
|
0
|
|
croak 'unimplemented in base class'; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub set { |
25
|
0
|
|
|
0
|
0
|
|
croak 'unimplemented in base class'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub socket { |
29
|
0
|
|
|
0
|
0
|
|
croak 'unimplemented in base class'; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub proxy { |
33
|
0
|
|
|
0
|
0
|
|
croak 'unimplemented in base class'; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub device { |
37
|
0
|
|
|
0
|
0
|
|
my ($self, $type, $front, $back) = @_; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
$self->check_error( |
40
|
|
|
|
|
|
|
'zmq_device', |
41
|
|
|
|
|
|
|
$self->_ffi->{zmq_device}->($type, $front->_socket, $back->_socket) |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub destroy { |
46
|
0
|
|
|
0
|
0
|
|
croak 'unimplemented in base class'; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub DEMOLISH { |
50
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
|
|
|
unless ($self->_ctx == -1) { |
53
|
0
|
|
|
|
|
|
$self->destroy(); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |