line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
7
|
|
|
7
|
|
888
|
use strict; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
468
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::FormFu::Element::Textarea; |
4
|
|
|
|
|
|
|
$HTML::FormFu::Element::Textarea::VERSION = '2.07'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Textarea form field |
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
130
|
use Moose; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
57
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends "HTML::FormFu::Element"; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'HTML::FormFu::Role::Element::Field', |
12
|
|
|
|
|
|
|
'HTML::FormFu::Role::Element::SingleValueField'; |
13
|
|
|
|
|
|
|
|
14
|
7
|
|
|
7
|
|
64049
|
use HTML::FormFu::Util qw( process_attrs ); |
|
7
|
|
|
|
|
20
|
|
|
7
|
|
|
|
|
1997
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_attr_accessors( qw( |
17
|
|
|
|
|
|
|
autocomplete |
18
|
|
|
|
|
|
|
cols |
19
|
|
|
|
|
|
|
maxlength |
20
|
|
|
|
|
|
|
rows |
21
|
|
|
|
|
|
|
placeholder |
22
|
|
|
|
|
|
|
) ); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
after BUILD => sub { |
25
|
|
|
|
|
|
|
my $self = shift; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
$self->layout_field_filename('field_layout_textarea_field'); |
28
|
|
|
|
|
|
|
$self->cols(40); |
29
|
|
|
|
|
|
|
$self->rows(20); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return; |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _string_field { |
35
|
12
|
|
|
12
|
|
37
|
my ( $self, $render ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# textarea_tag template |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $html = sprintf qq{<textarea name="%s"%s>}, |
40
|
|
|
|
|
|
|
$render->{nested_name}, |
41
|
12
|
|
|
|
|
51
|
process_attrs( $render->{attributes} ), |
42
|
|
|
|
|
|
|
; |
43
|
|
|
|
|
|
|
|
44
|
12
|
100
|
|
|
|
45
|
if ( defined $render->{value} ) { |
45
|
7
|
|
|
|
|
23
|
$html .= $render->{value}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
12
|
|
|
|
|
31
|
$html .= "</textarea>"; |
49
|
|
|
|
|
|
|
|
50
|
12
|
|
|
|
|
44
|
return $html; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=pod |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=encoding UTF-8 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 NAME |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
HTML::FormFu::Element::Textarea - Textarea form field |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 VERSION |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
version 2.07 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 SYNOPSIS |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $element = $form->element( Textarea => 'foo' ); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DESCRIPTION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Textarea form field. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 ATTRIBUTE ACCESSORS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Get / set input attributes directly with these methods. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Arguments: [$string] |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Return Value: $string |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 autocomplete |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 cols |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 maxlength |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 rows |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 placeholder |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SEE ALSO |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
100
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Field>, |
101
|
|
|
|
|
|
|
L<HTML::FormFu::Element> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L<HTML::FormFu> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 LICENSE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
112
|
|
|
|
|
|
|
the same terms as Perl itself. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 AUTHOR |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Carl Franks <cpan@fireartist.com> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Carl Franks. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
123
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |