FormHandler/Widget/Wrapper/Fieldset.pm

filter: Statementstmt 95.8% 23 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 93.3% 28 / 30 CC 2 SCAR 2.9
CC
2
Cov
96%
wrap_field
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« FormHandler/Field/TextArea.pm ↑ Summary FormHandler/Page.pm »
1 package HTML::FormHandler::Widget::Wrapper::Fieldset;
2 # ABSTRACT: fieldset field wrapper
3 1 $HTML::FormHandler::Widget::Wrapper::Fieldset::VERSION = '0.410002';
4 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use HTML::Entities qw( encode_entities );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 with 'HTML::FormHandler::Widget::Wrapper::Base';
9 1 ▶use HTML::FormHandler::Render::Util ('process_attrs');
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 3 ▶sub wrap_field {
Subroutine wrap_field: called CC=2 SCAR=7.0
Pod undocumented
13 3 my ( $self, $result, $rendered_widget ) = @_;
14  
15 3 my $wattrs = process_attrs($self->wrapper_attributes);
16 3 my $output = qq{\n<fieldset$wattrs>};
17 3 $output .= qq{\n<legend>} . $self->loc_label . '</legend>';
18  
19 3 $output .= "\n$rendered_widget";
20  
21 $output .= qq{\n<span class="error_message">$_</span>}
22 0 for map { encode_entities($_) } $result->all_errors;
23 3 $output .= "\n</fieldset>";
24  
25 3 return $output;
26 }
27  
28 1 1;
29  
30 __END__
« FormHandler/Field/TextArea.pm ↑ Summary FormHandler/Page.pm »