| 1 | package HTML::FormHandler::Widget::Wrapper::TableInline; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: wrapper class for table layout that doesn't wrap compound fields | ||||||||||||||||||||||||||||
| 3 | 1 | $HTML::FormHandler::Widget::Wrapper::TableInline::VERSION = '0.410002'; | |||||||||||||||||||||||||||
| 4 | 1 | ▶ | use Moose::Role; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 1 | with 'HTML::FormHandler::Widget::Wrapper::Base'; | |||||||||||||||||||||||||||
| 6 | 1 | ▶ | use HTML::FormHandler::Render::Util ('process_attrs'); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use HTML::Entities qw( encode_entities ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 3 | ▶ | sub wrap_field { | ||||||||||||||||||||||||||
|
Subroutine
wrap_field: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 10 | 3 | my ( $self, $result, $rendered_widget ) = @_; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 3 | ▶ | return $rendered_widget if $self->has_flag('is_compound'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 2 | my $output = "\n<tr" . process_attrs($self->wrapper_attributes($result)) . ">"; | |||||||||||||||||||||||||||
| 15 | 2 | ▶ | if ( $self->do_label && length( $self->label ) > 0 ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->do_label and length $self->label > 0
MC/DC0%0/2
$self->do_label and length $self->label > 0
$self->do_label
length $self->label > 0
Truth table33%1/3
A and B
A= $self->do_labelB= length $self->label > 0
| |||||||||||||||||||||||||||||
| 16 | 2 | $output .= '<td>' . $self->do_render_label($result) . '</td>'; | |||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | 2 | $output .= '<td>'; | |||||||||||||||||||||||||||
| 19 | 2 | $output .= $rendered_widget; | |||||||||||||||||||||||||||
| 20 | $output .= qq{\n<span class="error_message">$_</span>} | ||||||||||||||||||||||||||||
| 21 | 0 | for map { encode_entities($_) } $result->all_errors; | |||||||||||||||||||||||||||
| 22 | 2 | $output .= "</td></tr>\n"; | |||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 2 | return $output; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 1 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 28 | 1 | 1; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||||||||||