blib/lib/Script/Singleton.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 96.0% 24 / 25 CC 2 SCAR 2.5
CC
2
Cov
100%
import
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary
1 package Script::Singleton;
2  
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 ▶use Cwd qw(abs_path);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use IPC::Shareable;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 our $VERSION = '0.03';
10  
11 5 ▶sub import {
Subroutine import: called CC=2 SCAR=6.9
12 5 my ($class, %params) = @_;
13  
14 5 ▶ $params{glue} = abs_path((caller())[1]) if ! exists $params{glue};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $params{"glue"} 1 4 5
15  
16 5 IPC::Shareable->singleton($params{glue}, $params{warn});
17 }
18  
19 0 ▶sub __placeholder {}
Subroutine __placeholder: not called CC=1 SCAR=0.0
20  
21 5 1;
22 __END__
↑ Summary