| 1 | package Catalyst::Model::Factory; | ||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use MRO::Compat; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use base 'Catalyst::Model::Adaptor::Base'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use Catalyst::Utils (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 1 | ▶ | use Scalar::Util 'blessed'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 1 | our $VERSION = '0.10'; | |||||||||||
| 11 | |||||||||||||
| 12 | 0 | ▶ | sub COMPONENT { | ||||||||||
|
Subroutine
COMPONENT: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 13 | 0 | my ($class, @args) = @_; | |||||||||||
| 14 | 0 | my $self = $class->next::method(@args); | |||||||||||
| 15 | |||||||||||||
| 16 | 0 | $self->_load_adapted_class; | |||||||||||
| 17 | 0 | return $self; | |||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | 0 | ▶ | sub ACCEPT_CONTEXT { | ||||||||||
|
Subroutine
ACCEPT_CONTEXT: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||
| 21 | 0 | my ($self, $context, @args) = @_; | |||||||||||
| 22 | 0 | my $arg = {}; | |||||||||||
| 23 | 0 | ▶ | if ( scalar @args ) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 24 | 0 | ▶ | if ( ref($args[0]) eq 'HASH' ) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 25 | 0 | $arg = $args[0]; | |||||||||||
| 26 | } | ||||||||||||
| 27 | else { | ||||||||||||
| 28 | 0 | $arg = { @args }; | |||||||||||
| 29 | } | ||||||||||||
| 30 | } | ||||||||||||
| 31 | 0 | my $suffix = Catalyst::Utils::class2classsuffix(blessed $self); | |||||||||||
| 32 | return $self->_create_instance( | ||||||||||||
| 33 | $context, | ||||||||||||
| 34 | 0 | ▶ | $self->merge_config_hashes($context->config->{$suffix} || {}, $arg), | ||||||||||
|
Condition0%0/2
$context->config->{$suffix} || {}
MC/DC0%0/1
$context->config->{$suffix} || {}
$context->config->{$suffix}
Truth table0%0/2
A
A= $context->config->{$suffix}
| |||||||||||||
| 35 | ); | ||||||||||||
| 36 | } | ||||||||||||
| 37 | |||||||||||||
| 38 | 1 | 1; | |||||||||||
| 39 | __END__ | ||||||||||||