App/Plugin/Depends/Meta/Attribute.pm

filter: Statementstmt 95.6% 22 / 23 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 81.0% 30 / 37 CC 3 SCAR 6.2
CC
3
Cov
86%
__ANON__
3.2
register_implementation
2.0
BEGIN
1.0
CRAP 1.9
« App/Plugin/MutexGroup/Meta/Attribute.pm ↑ Summary App/Plugin/BashCompletion.pm »
1 # ============================================================================
2 package MooseX::App::Plugin::Depends::Meta::Attribute;
3 # ============================================================================
4  
5 3 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 has 'depends' => (
9 is => 'ro',
10 isa => 'ArrayRef[Str]',
11 5 ▶ default => sub { [] },
Subroutine __ANON__: called CC=1 SCAR=0.0
12 3 );
13  
14 11 ▶around 'cmd_tags_list' => sub {
Subroutine __ANON__: called CC=3 SCAR=11.8
15 11 my $orig = shift;
16 11 my ($self) = @_;
17  
18 11 my @tags = $self->$orig();
19  
20 11 ▶ push(@tags,'Depends')
Branch: 1 branch
BranchTrueFalseTotal
if $self->can("depends") and $self->depends 11 0 11
Condition33%1/3
$self->can("depends") and $self->depends
!ll&&!rl&&r
0011
MC/DC0%0/2
$self->can("depends") and $self->depends
$self->can("depends") $self->depends
Truth table33%1/3
A and B
A= $self->can("depends")B= $self->depends
ABresult
0X0
100
111
21 if $self->can('depends')
22 && $self->depends;
23  
24 11 return @tags;
25 3 };
26  
27 {
28 package Moose::Meta::Attribute::Custom::Trait::AppDepends;
29  
30 3 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 3 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 0 ▶ sub register_implementation { return 'MooseX::App::Plugin::Depends::Meta::Attribute' }
Subroutine register_implementation: not called CC=1 SCAR=6.9
34 }
35  
36 3 1;
« App/Plugin/MutexGroup/Meta/Attribute.pm ↑ Summary App/Plugin/BashCompletion.pm »