line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
99
|
|
|
99
|
|
1538
|
use strict; |
|
99
|
|
|
|
|
435
|
|
|
99
|
|
|
|
|
7373
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::FormFu::Element::Fieldset; |
4
|
|
|
|
|
|
|
$HTML::FormFu::Element::Fieldset::VERSION = '2.07'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Fieldset element |
6
|
|
|
|
|
|
|
|
7
|
99
|
|
|
99
|
|
719
|
use Moose; |
|
99
|
|
|
|
|
408
|
|
|
99
|
|
|
|
|
2370
|
|
8
|
|
|
|
|
|
|
extends 'HTML::FormFu::Element::Block'; |
9
|
|
|
|
|
|
|
|
10
|
99
|
|
|
99
|
|
732780
|
use HTML::FormFu::Util qw( xml_escape ); |
|
99
|
|
|
|
|
1406
|
|
|
99
|
|
|
|
|
21273
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__PACKAGE__->mk_output_accessors(qw( legend )); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
__PACKAGE__->mk_attrs(qw( legend_attributes )); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
after BUILD => sub { |
17
|
|
|
|
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$self->tag('fieldset'); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
return; |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub render_data_non_recursive { |
25
|
77
|
|
|
77
|
0
|
253
|
my ( $self, $args ) = @_; |
26
|
|
|
|
|
|
|
|
27
|
77
|
100
|
|
|
|
405
|
my $render = $self->SUPER::render_data_non_recursive( |
28
|
|
|
|
|
|
|
{ legend => $self->legend, |
29
|
|
|
|
|
|
|
legend_attributes => xml_escape( $self->legend_attributes ), |
30
|
|
|
|
|
|
|
$args ? %$args : (), |
31
|
|
|
|
|
|
|
} ); |
32
|
|
|
|
|
|
|
|
33
|
77
|
|
|
|
|
312
|
return $render; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=pod |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=encoding UTF-8 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
HTML::FormFu::Element::Fieldset - Fieldset element |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
version 2.07 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SYNOPSIS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $fs = $form->element( Fieldset => 'address' ); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Fieldset element. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 METHODS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 legend |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
If L</legend> is set, it is used as the fieldset's legend |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 legend_loc |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Arguments: $localization_key |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
To set the legend to a localized string, set L</legend_loc> to a key in |
73
|
|
|
|
|
|
|
your L10N file instead of using L</legend>. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 SEE ALSO |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
78
|
|
|
|
|
|
|
L<HTML::FormFu::Element::Block>, |
79
|
|
|
|
|
|
|
L<HTML::FormFu::Element> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L<HTML::FormFu> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 AUTHOR |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 LICENSE |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
90
|
|
|
|
|
|
|
the same terms as Perl itself. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Carl Franks <cpan@fireartist.com> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Carl Franks. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
101
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |