| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::FormFu::Role::Element::MultiElement; |
|
2
|
|
|
|
|
|
|
|
|
3
|
25
|
|
|
25
|
|
17515
|
use strict; |
|
|
25
|
|
|
|
|
37
|
|
|
|
25
|
|
|
|
|
1183
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
|
5
|
|
|
|
|
|
|
|
|
6
|
25
|
|
|
25
|
|
105
|
use Moose::Role; |
|
|
25
|
|
|
|
|
72
|
|
|
|
25
|
|
|
|
|
278
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
25
|
|
|
25
|
|
95600
|
use Carp qw( croak ); |
|
|
25
|
|
|
|
|
45
|
|
|
|
25
|
|
|
|
|
7025
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub nested_names { |
|
11
|
2030
|
|
|
2030
|
0
|
1669
|
my ($self) = @_; |
|
12
|
|
|
|
|
|
|
|
|
13
|
2030
|
50
|
|
|
|
2975
|
croak 'cannot set nested_names' if @_ > 1; |
|
14
|
|
|
|
|
|
|
|
|
15
|
2030
|
50
|
|
|
|
2955
|
if ( defined $self->name ) { |
|
16
|
2030
|
|
|
|
|
1559
|
my @names; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# ignore immediate parent |
|
19
|
2030
|
|
|
|
|
3826
|
my $parent = $self->parent; |
|
20
|
|
|
|
|
|
|
|
|
21
|
2030
|
|
|
|
|
3590
|
while ( defined( $parent = $parent->parent ) ) { |
|
22
|
|
|
|
|
|
|
|
|
23
|
2630
|
50
|
66
|
|
|
25334
|
if ( $parent->can('is_field') && $parent->is_field ) { |
|
|
|
100
|
100
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# handling Field |
|
26
|
0
|
0
|
|
|
|
0
|
push @names, $parent->name |
|
27
|
|
|
|
|
|
|
if defined $parent->name; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
elsif ( $parent->can('is_repeatable') && $parent->is_repeatable ) { |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# handling Repeatable |
|
32
|
|
|
|
|
|
|
# ignore Repeatables nested_name attribute as it is provided |
|
33
|
|
|
|
|
|
|
# by the childrens Block elements |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
else { |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# handling 'not Field' and 'not Repeatable' |
|
38
|
2564
|
100
|
|
|
|
56973
|
push @names, $parent->nested_name |
|
39
|
|
|
|
|
|
|
if defined $parent->nested_name; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
2030
|
100
|
|
|
|
3467
|
if (@names) { |
|
44
|
312
|
|
|
|
|
661
|
return reverse(@names), $self->name; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
1718
|
|
|
|
|
3321
|
return ( $self->name ); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub nested_base { |
|
52
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
|
53
|
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
croak 'cannot set nested_base' if @_ > 1; |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# ignore immediate parent |
|
57
|
0
|
|
|
|
|
|
my $parent = $self->parent; |
|
58
|
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
while ( defined( $parent = $parent->parent ) ) { |
|
60
|
|
|
|
|
|
|
|
|
61
|
0
|
0
|
|
|
|
|
return $parent->nested_name if defined $parent->nested_name; |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |