| 1 | 99 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | |||||||||||
| 3 | package HTML::FormFu::Element::Fieldset; | ||||||||||
| 4 | 99 | $HTML::FormFu::Element::Fieldset::VERSION = '2.06'; | |||||||||
| 5 | # ABSTRACT: Fieldset element | ||||||||||
| 6 | |||||||||||
| 7 | 99 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 99 | extends 'HTML::FormFu::Element::Block'; | |||||||||
| 9 | |||||||||||
| 10 | 99 | ▶ | use HTML::FormFu::Util qw( xml_escape ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 99 | __PACKAGE__->mk_output_accessors(qw( legend )); | |||||||||
| 13 | |||||||||||
| 14 | 99 | __PACKAGE__->mk_attrs(qw( legend_attributes )); | |||||||||
| 15 | |||||||||||
| 16 | after BUILD => sub { | ||||||||||
| 17 | 110 | ▶ | my $self = shift; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 18 | |||||||||||
| 19 | 110 | $self->tag('fieldset'); | |||||||||
| 20 | |||||||||||
| 21 | 110 | return; | |||||||||
| 22 | 99 | }; | |||||||||
| 23 | |||||||||||
| 24 | sub render_data_non_recursive { | ||||||||||
| 25 | 77 | ▶ | my ( $self, $args ) = @_; | ||||||||
|
Subroutine
render_data_non_recursive: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 26 | |||||||||||
| 27 | 77 | ▶ | my $render = $self->SUPER::render_data_non_recursive( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | { legend => $self->legend, | ||||||||||
| 29 | legend_attributes => xml_escape( $self->legend_attributes ), | ||||||||||
| 30 | $args ? %$args : (), | ||||||||||
| 31 | } ); | ||||||||||
| 32 | |||||||||||
| 33 | 77 | return $render; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 99 | __PACKAGE__->meta->make_immutable; | |||||||||
| 37 | |||||||||||
| 38 | 99 | 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.06 | ||||||||||
| 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 | ||||||||||