blib/lib/Quote/Code.pm

filter: Statementstmt 92.5% 25 / 27 Branchbran 50.0% 2 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 70.8% 34 / 48 CC 9 SCAR 16.5
CC
9
Cov
73%
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.0105';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 10 XSLoader::load;
12 }
13  
14 10 my %export = (
15 qc => HINTK_QC,
16 qc_to => HINTK_QC_TO,
17 qcw => HINTK_QCW,
18 );
19  
20 sub import {
21 11 ▶ my $class = shift;
Subroutine import: called CC=5 SCAR=19.9
22  
23 11 my @todo;
24 11 for my $item (@_) {
25 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
26 }
27 11 ▶ for my $item (@todo ? @todo : values %export) {
Branch: 1 branch
BranchTrueFalseTotal
@todo ? : 0 11 11
28 33 $^H{$item} = 1;
29 }
30 }
31  
32 sub unimport {
33 1 ▶ my $class = shift;
Subroutine unimport: called CC=5 SCAR=19.9
34 1 my @todo;
35 1 for my $item (@_) {
36 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
37 }
38 1 ▶ for my $item (@todo ? @todo : values %export) {
Branch: 1 branch
BranchTrueFalseTotal
@todo ? : 0 1 1
39 3 delete $^H{$item};
40 }
41 }
42  
43 10 'ok'
44  
45 __END__
↑ Summary Code.xs »