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 SCAR 24.5
CC
6
Cov
46%
_process_options_from_model
21.2
BEGIN
1.0
BEGIN
1.0
CRAP 11.5
« lib/HTML/FormFu/Inflator/DateTime.pm ↑ Summary lib/HTML/FormFu/Validator.pm »
1 68 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Role::Element::ProcessOptionsFromModel;
4 68 $HTML::FormFu::Role::Element::ProcessOptionsFromModel::VERSION = '2.06';
5 68 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub _process_options_from_model {
8 274 ▶ my ($self) = @_;
Subroutine _process_options_from_model: called CC=6 SCAR=30.5
9  
10 274 my $args = $self->model_config;
11  
12 274 ▶ return if !$args || !keys %$args;
Branch: 1 branch
BranchTrueFalseTotal
unless $args and keys %$args 274 0 274
Condition33%1/3
$args and keys %$args
!ll&&!rl&&r
02740
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
13  
14 0 ▶ return if @{ $self->options };
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->options;} 0 0 0
15  
16 # don't run if {options_from_model} is set and is 0
17  
18 my $option_flag
19 = exists $args->{options_from_model}
20 ? $args->{options_from_model}
21 0 ▶ : 1;
Branch: 1 branch
BranchTrueFalseTotal
exists $args->{'options_from_model'} ? : 0 0 0
22  
23 0 ▶ return if !$option_flag;
Branch: 1 branch
BranchTrueFalseTotal
unless $option_flag 0 0 0
24  
25 0 $self->options(
26 [ $self->form->model->options_from_model( $self, $args ) ] );
27  
28 0 return;
29 }
30  
31 68 1;
32  
33 __END__
34  
35 =pod
36  
37 =encoding UTF-8
38  
39 =head1 NAME
40  
41 HTML::FormFu::Role::Element::ProcessOptionsFromModel
42  
43 =head1 VERSION
44  
45 version 2.06
46  
47 =head1 AUTHOR
48  
49 Carl Franks <cpan@fireartist.com>
50  
51 =head1 COPYRIGHT AND LICENSE
52  
53 This software is copyright (c) 2018 by Carl Franks.
54  
55 This is free software; you can redistribute it and/or modify it under
56 the same terms as the Perl 5 programming language system itself.
57  
58 =cut
« lib/HTML/FormFu/Inflator/DateTime.pm ↑ Summary lib/HTML/FormFu/Validator.pm »