blib/lib/Quote/Code.pm

filter: Statementstmt 92.8% 26 / 28 Branchbran 50.0% 2 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 71.4% 35 / 49 CC 9 SCAR 16.5
CC
9
Cov
74%
import
7.3
unimport
7.3
BEGIN
1.0
CRAP 5.2
↑ Summary Code.xs »
1 package Quote::Code;
2  
3 10 ▶use v5.14.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 10 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 10 ▶use XSLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 BEGIN {
10 10 ▶ our $VERSION = '1.01_06';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 10 XSLoader::load;
12 10 $VERSION =~ tr/_//d;
13 }
14  
15 10 my %export = (
16 qc => HINTK_QC,
17 qc_to => HINTK_QC_TO,
18 qcw => HINTK_QCW,
19 );
20  
21 sub import {
22 11 ▶ my $class = shift;
Subroutine import: called CC=5 SCAR=19.9
23  
24 11 my @todo;
25 11 for my $item (@_) {
26 0 ▶ push @todo, $export{$item} || croak qq{"$item" is not exported by the $class module};
Condition0%0/3
$export{$item} || croak(qq["$item" is not exported by the $class module])
l!l&&r!l&&!r
000
MC/DC0%0/2
$export{$item} || croak(qq["$item" is not exported by the $class module])
$export{$item} croak(qq["$item" is not exported by the $class module])
Truth table0%0/3
A || B
A= $export{$item}B= croak(qq["$item" is not exported by the $class module])
ABresult
1X1
011
000
27 }
28 11 ▶ for my $item (@todo ? @todo : values %export) {
Branch: 1 branch
BranchTrueFalseTotal
@todo ? : 0 11 11
29 33 $^H{$item} = 1;
30 }
31 }
32  
33 sub unimport {
34 1 ▶ my $class = shift;
Subroutine unimport: called CC=5 SCAR=19.9
35 1 my @todo;
36 1 for my $item (@_) {
37 0 ▶ push @todo, $export{$item} || croak qq{"$item" is not exported by the $class module};
Condition0%0/3
$export{$item} || croak(qq["$item" is not exported by the $class module])
l!l&&r!l&&!r
000
MC/DC0%0/2
$export{$item} || croak(qq["$item" is not exported by the $class module])
$export{$item} croak(qq["$item" is not exported by the $class module])
Truth table0%0/3
A || B
A= $export{$item}B= croak(qq["$item" is not exported by the $class module])
ABresult
1X1
011
000
38 }
39 1 ▶ for my $item (@todo ? @todo : values %export) {
Branch: 1 branch
BranchTrueFalseTotal
@todo ? : 0 1 1
40 3 delete $^H{$item};
41 }
42 }
43  
44 10 'ok'
45  
46 __END__
↑ Summary Code.xs »