FFI/ContextBase.pm

filter: Statementstmt 56.5% 13 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 30.0% 3 / 10 Podpod 0.0% 0 / 7 totaltotal 38.1% 16 / 42 CC 2 SCAR 9.0
CC
2
Cov
52%
DEMOLISH
6.0
get
2.0
set
2.0
CRAP 2.5
« FFI/ZMQ2/Socket.pm ↑ Summary FFI/Constants.pm »
1 package ZMQ::FFI::ContextBase;
2 1 $ZMQ::FFI::ContextBase::VERSION = '0.18';
3 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 with qw(
9 ZMQ::FFI::ContextRole
10 ZMQ::FFI::ErrorHandler
11 ZMQ::FFI::Versioner
12 );
13  
14 # real underlying zmq ctx pointer
15 1 has _ctx => (
16 is => 'rw',
17 default => -1,
18 );
19  
20 sub get {
21 0 ▶ croak 'unimplemented in base class';
Subroutine get: not called CC=1 SCAR=6.9
Pod undocumented
22 }
23  
24 sub set {
25 0 ▶ croak 'unimplemented in base class';
Subroutine set: not called CC=1 SCAR=6.9
Pod undocumented
26 }
27  
28 sub socket {
29 0 ▶ croak 'unimplemented in base class';
Subroutine socket: not called CC=1 SCAR=6.9
Pod undocumented
30 }
31  
32 sub proxy {
33 0 ▶ croak 'unimplemented in base class';
Subroutine proxy: not called CC=1 SCAR=6.9
Pod undocumented
34 }
35  
36 sub device {
37 0 ▶ my ($self, $type, $front, $back) = @_;
Subroutine device: not called CC=1 SCAR=6.9
Pod undocumented
38  
39 $self->check_error(
40 'zmq_device',
41 0 $self->_ffi->{zmq_device}->($type, $front->_socket, $back->_socket)
42 );
43 }
44  
45 sub destroy {
46 0 ▶ croak 'unimplemented in base class';
Subroutine destroy: not called CC=1 SCAR=6.9
Pod undocumented
47 }
48  
49 sub DEMOLISH {
50 0 ▶ my $self = shift;
Subroutine DEMOLISH: not called CC=2 SCAR=17.9
Pod undocumented
51  
52 0 ▶ unless ($self->_ctx == -1) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_ctx == -1) 0 0 0
53 0 $self->destroy();
54 }
55 }
56  
57 1 __PACKAGE__->meta->make_immutable();
58  
59 __END__
« FFI/ZMQ2/Socket.pm ↑ Summary FFI/Constants.pm »