blib/lib/B/Hooks/OP/Check/EntersubForCV.pm

filter: Statementstmt 100% 33 / 33 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 1 / 1 totaltotal 97.8% 46 / 47 CC 4 SCAR 5.1
CC
4
Cov
97%
import
3.0
unimport
2.0
BEGIN
1.0
CRAP 1.7
« blib/arch/B/Hooks/OP/Check/EntersubForCV/Install/Files.pm ↑ Summary EntersubForCV.xs »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package B::Hooks::OP::Check::EntersubForCV;
5  
6 2 ▶use parent qw/DynaLoader/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use B::Hooks::OP::Check 0.19;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Scalar::Util qw/refaddr/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use B::Utils 0.19 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 our $VERSION = '0.10';
12  
13 2 ▶sub dl_load_flags { 0x01 }
Subroutine dl_load_flags: called CC=1 SCAR=0.0
Pod documented
14  
15 2 __PACKAGE__->bootstrap($VERSION);
16  
17 2 my %CALLBACKS;
18  
19 2 ▶sub import {
Subroutine import: called CC=3 SCAR=11.0
20 2 my $class = shift;
21  
22 2 ▶ die 'odd number of arguments'
Branch: 1 branch
BranchTrueFalseTotal
unless @_ % 2 == 0 0 2 2
23 unless @_ % 2 == 0;
24  
25 2 ▶ while (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 3 2 5
26 3 my ($cv, $cb) = (shift, shift);
27 3 $CALLBACKS{ refaddr $cv } = register($cv, $cb);
28 }
29  
30 2 return;
31 }
32  
33 1 ▶sub unimport {
Subroutine unimport: called CC=2 SCAR=6.9
34 1 my $class = shift;
35  
36 1 unregister($_) for delete @CALLBACKS{ map { refaddr $_ } @_ };
37 1 return;
38 }
39  
40 2 1;
41  
42 __END__
« blib/arch/B/Hooks/OP/Check/EntersubForCV/Install/Files.pm ↑ Summary EntersubForCV.xs »