FFI/ContextBase.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 37.5% 3 / 8 Podpod 0.0% 0 / 5 totaltotal 45.7% 16 / 35 CC 2 SCAR 9.4
CC
2
Cov
59%
DEMOLISH
6.0
get
2.0
set
2.0
CRAP 2.6
« FFI/ZMQ2/Context.pm ↑ Summary FFI/Constants.pm »
1 package ZMQ::FFI::ContextBase;
2 1 $ZMQ::FFI::ContextBase::VERSION = '0.16';
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 destroy {
33 0 ▶ croak 'unimplemented in base class';
Subroutine destroy: not called CC=1 SCAR=6.9
Pod undocumented
34 }
35  
36 sub DEMOLISH {
37 0 ▶ my $self = shift;
Subroutine DEMOLISH: not called CC=2 SCAR=17.9
Pod undocumented
38  
39 0 ▶ unless ($self->_ctx == -1) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_ctx == -1) 0 0 0
40 0 $self->destroy();
41 }
42 }
43  
44 1 __PACKAGE__->meta->make_immutable();
45  
46 __END__
« FFI/ZMQ2/Context.pm ↑ Summary FFI/Constants.pm »