| 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
Condition33%1/3
$args and keys %$args
MC/DC0%0/2
$args and keys %$args
$args
keys %$args
Truth table33%1/3
A and B
A= $argsB= keys %$args
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | ▶ | return if @{ $self->options }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 0 | ▶ | return if !$option_flag; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||