line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
69
|
|
|
69
|
|
43913
|
use strict; |
|
69
|
|
|
|
|
538
|
|
|
69
|
|
|
|
|
3964
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::FormFu::Role::Element::ProcessOptionsFromModel; |
4
|
|
|
|
|
|
|
# ABSTRACT: process_options_from_model role |
5
|
|
|
|
|
|
|
$HTML::FormFu::Role::Element::ProcessOptionsFromModel::VERSION = '2.07'; |
6
|
69
|
|
|
69
|
|
455
|
use Moose::Role; |
|
69
|
|
|
|
|
159
|
|
|
69
|
|
|
|
|
490
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _process_options_from_model { |
9
|
276
|
|
|
276
|
|
684
|
my ($self) = @_; |
10
|
|
|
|
|
|
|
|
11
|
276
|
|
|
|
|
1344
|
my $args = $self->model_config; |
12
|
|
|
|
|
|
|
|
13
|
276
|
50
|
33
|
|
|
1781
|
return if !$args || !keys %$args; |
14
|
|
|
|
|
|
|
|
15
|
0
|
0
|
|
|
|
|
return if @{ $self->options }; |
|
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
|
0
|
|
|
|
|
: 1; |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
return if !$option_flag; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
$self->options( |
27
|
|
|
|
|
|
|
[ $self->form->model->options_from_model( $self, $args ) ] ); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=encoding UTF-8 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
HTML::FormFu::Role::Element::ProcessOptionsFromModel - process_options_from_model role |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
version 2.07 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Carl Franks <cpan@fireartist.com> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Carl Franks. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
57
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |