| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package HTML::FormHandler::Widget::Field::Textarea; | 
| 2 |  |  |  |  |  |  | # ABSTRACT: textarea rendering widget | 
| 3 |  |  |  |  |  |  | $HTML::FormHandler::Widget::Field::Textarea::VERSION = '0.40068'; | 
| 4 | 8 |  |  | 8 |  | 5723 | use Moose::Role; | 
|  | 8 |  |  |  |  | 22 |  | 
|  | 8 |  |  |  |  | 84 |  | 
| 5 | 8 |  |  | 8 |  | 40237 | use namespace::autoclean; | 
|  | 8 |  |  |  |  | 25 |  | 
|  | 8 |  |  |  |  | 76 |  | 
| 6 | 8 |  |  | 8 |  | 612 | use HTML::FormHandler::Render::Util ('process_attrs'); | 
|  | 8 |  |  |  |  | 21 |  | 
|  | 8 |  |  |  |  | 70 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | sub render_element { | 
| 9 | 12 |  |  | 12 | 0 | 31 | my $self = shift; | 
| 10 | 12 |  | 33 |  |  | 46 | my $result = shift || $self->result; | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 12 |  |  |  |  | 55 | my $fif  = $self->html_filter($result->fif); | 
| 13 | 12 |  |  |  |  | 336 | my $id   = $self->id; | 
| 14 | 12 |  | 100 |  |  | 372 | my $cols = $self->cols || 10; | 
| 15 | 12 |  | 100 |  |  | 357 | my $rows = $self->rows || 5; | 
| 16 | 12 |  |  |  |  | 299 | my $name = $self->html_name; | 
| 17 | 12 |  |  |  |  | 94 | my $output = | 
| 18 |  |  |  |  |  |  | qq(<textarea name="$name" id="$id") | 
| 19 |  |  |  |  |  |  | . process_attrs($self->element_attributes($result)) | 
| 20 |  |  |  |  |  |  | . qq( rows="$rows" cols="$cols">$fif</textarea>); | 
| 21 | 12 |  |  |  |  | 52 | return $output; | 
| 22 |  |  |  |  |  |  | } | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | sub render { | 
| 25 | 12 |  |  | 12 | 0 | 42 | my ( $self, $result ) = @_; | 
| 26 | 12 |  | 66 |  |  | 141 | $result ||= $self->result; | 
| 27 | 12 | 50 |  |  |  | 47 | die "No result for form field '" . $self->full_name . "'. Field may be inactive." unless $result; | 
| 28 | 12 |  |  |  |  | 53 | my $output = $self->render_element( $result ); | 
| 29 | 12 |  |  |  |  | 67 | return $self->wrap_field( $result, $output ); | 
| 30 |  |  |  |  |  |  | } | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | 1; | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | __END__ | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | =pod | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =encoding UTF-8 | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head1 NAME | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | HTML::FormHandler::Widget::Field::Textarea - textarea rendering widget | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | =head1 VERSION | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | version 0.40068 | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | =head1 AUTHOR | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | FormHandler Contributors - see HTML::FormHandler | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | This software is copyright (c) 2017 by Gerda Shank. | 
| 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 |