blib/lib/Linux/Pid.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 1 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 81.8% 27 / 33 CC 4 SCAR 10.4
CC
4
Cov
85%
import
4.2
BEGIN
1.0
BEGIN
1.0
CRAP 2.8
↑ Summary Pid.xs »
1 package Linux::Pid;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = 0.04;
7 2 require XSLoader;
8 2 XSLoader::load('Linux::Pid', $VERSION);
9  
10 2 ▶sub import {
Subroutine import: called CC=4 SCAR=14.4
11 2 shift;
12 2 my $p = caller;
13 2 for my $symbol (@_) {
14 2 ▶ if ($symbol eq 'getpid' or $symbol eq 'getppid') {
Branch: 1 branch
BranchTrueFalseTotal
if ($symbol eq 'getpid' or $symbol eq 'getppid') { } 2 0 2
Condition66%2/3
$symbol eq "getpid" or $symbol eq "getppid"
l!l&&r!l&&!r
110
MC/DC0%0/2
$symbol eq "getpid" or $symbol eq "getppid"
$symbol eq "getpid" $symbol eq "getppid"
Truth table66%2/3
A or B
A= $symbol eq "getpid"B= $symbol eq "getppid"
ABresult
1X1
011
000
15 2 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 *{$p."::".$symbol} = \&{$symbol};
17 } else {
18 0 require Carp;
19 0 Carp::croak("Unrecognized symbol $symbol");
20 }
21 }
22 }
23  
24 2 1;
25  
26 __END__
↑ Summary Pid.xs »