blib/lib/Linux/Event/Loop.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 85.3% 35 / 41 CC 3 SCAR 5.9
CC
3
Cov
90%
add
3.0
CLONE_SKIP
2.0
CLONE_SKIP
2.0
CRAP 1.8
« blib/lib/Linux/Event/Error.pm ↑ Summary bench/run-datagram-microbench.pl »
1 package Linux::Event::Loop;
2 135 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 135 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 135 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 135 our $VERSION = '0.105';
7  
8 135 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 135 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 135 require XSLoader;
12 135 XSLoader::load(__PACKAGE__, $VERSION);
13  
14 135 require Linux::Event::Loop::Introspection;
15 135 our @ISA = ('Linux::Event::Loop::Introspection');
16  
17 203156 ▶sub add ($self, $object) {
Subroutine add: called CC=3 SCAR=11.0
Pod documented
18 203156 ▶ croak 'add(): object must support loop attachment'
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($object) and $object->can("_attach_to_loop") 1 203155 203156
Condition66%2/3
builtin::blessed($object) and $object->can("_attach_to_loop")
!ll&&!rl&&r
01203155
MC/DC50%1/2
builtin::blessed($object) and $object->can("_attach_to_loop")
builtin::blessed($object) $object->can("_attach_to_loop")
Truth table66%2/3
A and B
A= builtin::blessed($object)B= $object->can("_attach_to_loop")
ABresult
0X0
100
111
19 if !blessed($object) || !$object->can('_attach_to_loop');
20 203155 $object->_attach_to_loop($self);
21 203148 return $object;
22 }
23  
24 0 ▶sub CLONE_SKIP ($class) { 1 }
Subroutine CLONE_SKIP: not called CC=1 SCAR=6.9
25  
26 package Linux::Event::_Registration;
27 0 ▶sub CLONE_SKIP ($class) { 1 }
Subroutine CLONE_SKIP: not called CC=1 SCAR=6.9
28  
29 package Linux::Event::Loop;
30  
31 135 1;
32  
33 __END__
« blib/lib/Linux/Event/Error.pm ↑ Summary bench/run-datagram-microbench.pl »