Midgen/Role/Attributes.pm

filter: Statementstmt 70.7% 29 / 41 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 38.4% 5 / 13 Podpod n/a totaltotal 53.9% 34 / 63 CC 4 SCAR 13.7
CC
4
Cov
60%
_develop
12.0
_meta2
6.0
__ANON__
2.0
CRAP 3.9
« Midgen/Role/Options.pm ↑ Summary Midgen/Role/AttributesX.pm »
1 package App::Midgen::Role::Attributes;
2  
3 2 ▶use constant {TRUE => 1, FALSE => 0,};
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Types::Standard qw( ArrayRef Bool Int Object Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 requires qw( experimental format );
8  
9 # Load time and dependencies negate execution time
10 # use namespace::clean -except => 'meta';
11  
12 2 our $VERSION = '0.34';
13 2 $VERSION = eval $VERSION; ## no critic
14  
15 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 #######
18 # some encapsulated -> attributes
19 #######
20  
21 2 has 'develop' => (
22 is => 'ro',
23 isa => Bool,
24 lazy => 1,
25 builder => '_develop',
26 );
27  
28 0 ▶sub _develop {
Subroutine _develop: not called CC=3 SCAR=24.8
29 0 my $self = shift;
30  
31 0 ▶ if ( $self->experimental && ( $self->format =~ m/cpanfile|metajson|dist/) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->experimental and $self->format =~ /cpanfile|metajson|dist/) { } 0 0 0
Condition0%0/3
$self->experimental and $self->format =~ /cpanfile|metajson|dist/
!ll&&!rl&&r
000
MC/DC0%0/2
$self->experimental and $self->format =~ /cpanfile|metajson|dist/
$self->experimental $self->format =~ /cpanfile|metajson|dist/
Truth table0%0/3
A and B
A= $self->experimentalB= $self->format =~ /cpanfile|metajson|dist/
ABresult
0X0
100
111
32 0 return 1;
33 } else {
34 0 return 0;
35 }
36 }
37  
38 2 has 'distribution_name' => (
39 is => 'rwp',
40 isa => Str,
41 lazy => 1,
42 );
43  
44 has 'found_twins' => (
45 is => 'rwp',
46 isa => Bool,
47 lazy => 1,
48 0 ▶ default => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
49 0 0;
50 },
51 2 );
52  
53 2 has 'meta2' => (
54 is => 'ro',
55 isa => Bool,
56 lazy => 1,
57 builder => '_meta2',
58 );
59  
60 0 ▶sub _meta2 {
Subroutine _meta2: not called CC=2 SCAR=17.9
61 0 my $self = shift;
62  
63 0 ▶ if ( $self->format =~ m/cpanfile|metajson|dist/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->format =~ /cpanfile|metajson|dist/) { } 0 0 0
64 0 return TRUE;
65 } else {
66 0 return FALSE;
67 }
68 }
69  
70 has 'numify' => (
71 is => 'ro',
72 isa => Bool,
73 0 ▶ default => sub {0},
Subroutine __ANON__: not called CC=1 SCAR=6.9
74 2 lazy => 1,
75 );
76  
77 has 'package_names' => (
78 is => 'rw',
79 isa => ArrayRef,
80 0 ▶ default => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
81 2 lazy => 1,
82 );
83  
84 has 'phase_relationship' => (
85 is => 'rwp',
86 isa => Str,
87 lazy => 1,
88 0 ▶ default => sub { },
Subroutine __ANON__: not called CC=1 SCAR=0.0
89 2 );
90  
91 2 has 'ppi_document' => (
92 is => 'rwp',
93 isa => Object,
94 lazy => 1,
95 );
96  
97 has 'xtest' => (
98 is => 'rwp',
99 isa => Bool,
100 lazy => 1,
101 0 ▶ default => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
102 0 return FALSE;
103 },
104 2 );
105  
106 has 'looking_infile' => (
107 is => 'rwp',
108 isa => Str,
109 lazy => 1,
110 0 ▶ default => sub { },
Subroutine __ANON__: not called CC=1 SCAR=0.0
111 2 );
112  
113 2 ▶no Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
114  
115 2 1;
116  
117 __END__
« Midgen/Role/Options.pm ↑ Summary Midgen/Role/AttributesX.pm »