MuForm/Field/Textarea.pm

filter: Statementstmt 100% 16 / 16 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 84.6% 22 / 26 SCAR 11.0
CC
3
Cov
90%
base_render_args
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« MuForm/Field/PrimaryKey.pm ↑ Summary MuForm/Field/Checkbox.pm »
1 package Data::MuForm::Field::Textarea;
2 # ABSTRACT: textarea input
3  
4 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 extends 'Data::MuForm::Field::Text';
6 4 ▶use Types::Standard -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶sub build_form_element { 'textarea' }
Subroutine build_form_element: called CC=1 SCAR=0.0
Pod undocumented
9  
10 4 has 'cols' => ( is => 'rw', default => 40 );
11 4 has 'rows' => ( is => 'rw', default => 5 );
12  
13 sub base_render_args {
14 3 ▶ my $self = shift;
Subroutine base_render_args: called CC=3 SCAR=11.3
Pod undocumented
15 3 my $args = $self->next::method(@_);
16 3 ▶ $args->{element_attr}->{cols} = $self->cols if $self->cols;
Branch: 1 branch
BranchTrueFalseTotal
if $self->cols 3 0 3
17 3 ▶ $args->{element_attr}->{rows} = $self->rows if $self->rows;
Branch: 1 branch
BranchTrueFalseTotal
if $self->rows 3 0 3
18 3 return $args;
19 }
20  
21  
22  
23 4 1;
24  
25 __END__
26  
27 =pod
28  
29 =encoding UTF-8
30  
31 =head1 NAME
32  
33 Data::MuForm::Field::Textarea - textarea input
34  
35 =head1 VERSION
36  
37 version 0.04
38  
39 =head1 Summary
40  
41 For HTML textarea
42  
43 =head1 AUTHOR
44  
45 Gerda Shank
46  
47 =head1 COPYRIGHT AND LICENSE
48  
49 This software is copyright (c) 2017 by Gerda Shank.
50  
51 This is free software; you can redistribute it and/or modify it under
52 the same terms as the Perl 5 programming language system itself.
53  
54 =cut
« MuForm/Field/PrimaryKey.pm ↑ Summary MuForm/Field/Checkbox.pm »