MixinFactory/HasAFactory.pm

filter: Statementstmt 100% 15 / 15 Branchbran 100% 2 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 86.2% 25 / 29 CC 3 SCAR 6.5
CC
3
Cov
90%
mixin_factory
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« MixinFactory/InsideOutAttr.pm ↑ Summary
1 package Class::MixinFactory::HasAFactory;
2  
3 8 ▶use Class::MixinFactory::NEXT;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 @ISA = 'Class::MixinFactory::NEXT';
5  
6 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 ########################################################################
9  
10 8 ▶use Class::MixinFactory::InsideOutAttr 'mixin_factory_ref';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 27 ▶sub mixin_factory {
Subroutine mixin_factory: called CC=3 SCAR=11.4
Pod documented
13 27 my $self = shift;
14 27 ▶ my $base_class = ref($self) || $self;
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
0270
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
15 27 ▶ $base_class->mixin_factory_ref() or $base_class->mixin_factory_ref(
Branch: 1 branch
BranchTrueFalseTotal
$base_class->mixin_factory_ref or $base_class->mixin_factory_ref("Class::MixinFactory::Factory"->new("base_class", $base_class)) 25 2 27
16 Class::MixinFactory::Factory->new( base_class => $base_class )
17 )
18 }
19  
20 25 ▶sub class {
Subroutine class: called CC=1 SCAR=0.0
Pod documented
21 25 (shift)->mixin_factory()->class( @_ )
22 }
23  
24 ########################################################################
25  
26 8 1;
27  
28 __END__
« MixinFactory/InsideOutAttr.pm ↑ Summary