| 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
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table33%1/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||
| 15 | 27 | ▶ | $base_class->mixin_factory_ref() or $base_class->mixin_factory_ref( | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||