ProcessTable/Table/Base.pm

filter: Statementstmt 100% 33 / 33 Branchbran 100% 4 / 4 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 2 totaltotal 92.4% 49 / 53 CC 4 SCAR 6.9
CC
4
Cov
98%
process
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« ProcessTable/Role/Table/PPT.pm ↑ Summary ProcessTable.pm »
1 package P9Y::ProcessTable::Table::Base;
2  
3 3 our $AUTHORITY = 'cpan:BBYRD'; # AUTHORITY
4 3 our $VERSION = '1.06_01'; # VERSION
5  
6 #############################################################################
7 # Modules
8  
9 # use sanity;
10 3 ▶use strict qw(subs vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 3 ▶no warnings qw(uninitialized);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 3 ▶no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 #############################################################################
21 # Common Methods (may potentially be overloaded with OS-specific ones)
22  
23 sub table {
24 1 ▶ my $self = shift;
Subroutine table: called CC=1 SCAR=0.0
Pod undocumented
25 1 return map { $self->process($_) } ($self->list);
26 }
27  
28 sub process {
29 12 ▶ my ($self, $pid) = @_;
Subroutine process: called CC=4 SCAR=13.9
Pod undocumented
30 12 ▶ $pid = $$ if (@_ == 1);
Branch: 1 branch
BranchTrueFalseTotal
if @_ == 1 1 11 12
31 12 my $hash = $self->_process_hash($pid);
32 12 ▶ return unless $hash && $hash->{pid};
Branch: 1 branch
BranchTrueFalseTotal
unless $hash and $hash->{"pid"} 1 11 12
Condition66%2/3
$hash and $hash->{"pid"}
!ll&&!rl&&r
1011
MC/DC50%1/2
$hash and $hash->{"pid"}
$hash $hash->{"pid"}
Truth table66%2/3
A and B
A= $hashB= $hash->{"pid"}
ABresult
0X0
100
111
33  
34 11 $hash->{_pt_obj} = $self;
35 11 return P9Y::ProcessTable::Process->new($hash);
36 }
37  
38 3 42;
« ProcessTable/Role/Table/PPT.pm ↑ Summary ProcessTable.pm »