| 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])
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])
| |||||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | 11 | ▶ | for my $item (@todo ? @todo : values %export) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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])
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])
| |||||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | 1 | ▶ | for my $item (@todo ? @todo : values %export) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 40 | 3 | delete $^H{$item}; | |||||||||||||||||||
| 41 | } | ||||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 10 | 'ok' | |||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | __END__ | ||||||||||||||||||||