lib/HTML/FormFu/Role/Element/ProcessOptionsFromModel.pm

filter: Statementstmt 64.7% 11 / 17 Branchbran 12.5% 1 / 8 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 48.4% 16 / 33 CC 6 SCAR 27.8
CC
6
Cov
46%
_process_options_from_model
21.2
BEGIN
1.0
BEGIN
1.0
CRAP 16.1
« lib/HTML/FormFu/Element/Block.pm ↑ Summary lib/HTML/FormFu/QueryType/Catalyst.pm »
1 77 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Role::Element::ProcessOptionsFromModel;
4 # ABSTRACT: process_options_from_model role
5 77 $HTML::FormFu::Role::Element::ProcessOptionsFromModel::VERSION = '2.09';
6 77 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 288 ▶sub _process_options_from_model {
Subroutine _process_options_from_model: called CC=6 SCAR=30.5
9 288 my ($self) = @_;
10  
11 288 my $args = $self->model_config;
12  
13 288 ▶ return if !$args || !keys %$args;
Branch: 1 branch
BranchTrueFalseTotal
unless $args and keys %$args 288 0 288
Condition33%1/3
$args and keys %$args
!ll&&!rl&&r
02880
MC/DC0%0/2
$args and keys %$args
$args keys %$args
Truth table33%1/3
A and B
A= $argsB= keys %$args
ABresult
0X0
100
111
14  
15 0 ▶ return if @{ $self->options };
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->options;} 0 0 0
16  
17 # don't run if {options_from_model} is set and is 0
18  
19 my $option_flag
20 = exists $args->{options_from_model}
21 ? $args->{options_from_model}
22 0 ▶ : 1;
Branch: 1 branch
BranchTrueFalseTotal
exists $args->{'options_from_model'} ? : 0 0 0
23  
24 0 ▶ return if !$option_flag;
Branch: 1 branch
BranchTrueFalseTotal
unless $option_flag 0 0 0
25  
26 0 $self->options(
27 [ $self->form->model->options_from_model( $self, $args ) ] );
28  
29 0 return;
30 }
31  
32 77 1;
33  
34 __END__
« lib/HTML/FormFu/Element/Block.pm ↑ Summary lib/HTML/FormFu/QueryType/Catalyst.pm »