lib/Reaction/UI/Controller/Role/Action/Simple.pm

filter: Statementstmt 93.3% 14 / 15 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 76.9% 20 / 26 CC 3 SCAR 8.0
CC
3
Cov
84%
setup_viewport
3.1
_build_action_viewport_args
2.0
BEGIN
1.0
CRAP 2.2
« lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm ↑ Summary lib/Reaction/UI/Controller/Collection.pm »
1 package Reaction::UI::Controller::Role::Action::Simple;
2  
3 4 ▶use Moose::Role -traits => 'MethodAttributes';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 4 requires 'push_viewport';
6 4 requires 'merge_config_hashes';
7  
8 4 has action_viewport_map => (isa => 'HashRef', is => 'rw', lazy_build => 1);
9 4 has action_viewport_args => (isa => 'HashRef', is => 'rw', lazy_build => 1);
10  
11 3 ▶sub _build_action_viewport_map { {} }
Subroutine _build_action_viewport_map: called CC=1 SCAR=0.0
12  
13 0 ▶sub _build_action_viewport_args { {} }
Subroutine _build_action_viewport_args: not called CC=1 SCAR=6.9
14  
15 3 ▶sub setup_viewport {
Subroutine setup_viewport: called CC=3 SCAR=11.3
Pod documented
16 3 my ($self, $c, $vp_args) = @_;
17 3 my $action_name = $c->stack->[-1]->name;
18 3 my $vp = $self->action_viewport_map->{$action_name};
19 my $args = $self->merge_config_hashes(
20 $vp_args || {},
21 3 ▶ $self->action_viewport_args->{$action_name} || {} ,
Condition50%2/4
$vp_args || {}
l!l
30
$self->action_viewport_args->{$action_name} || {}
l!l
03
MC/DC0%0/1
$vp_args || {}
$vp_args
MC/DC0%0/1
$self->action_viewport_args->{$action_name} || {}
$self->action_viewport_args->{$action_name}
Truth table50%1/2
A
A= $vp_args
Aresult
11
00
Truth table50%1/2
A
A= $self->action_viewport_args->{$action_name}
Aresult
11
00
22 );
23 3 return $self->push_viewport($vp, %$args);
24 }
25  
26 4 1;
27  
28 __END__;
« lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm ↑ Summary lib/Reaction/UI/Controller/Collection.pm »