FormHandler/Widget/Block/Bootstrap.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 2 totaltotal 72.4% 21 / 29 CC 3 SCAR 8.5
CC
3
Cov
86%
render_from_list
3.2
BEGIN
1.0
BUILD
1.0
CRAP 2.3
« FormHandler/Widget/Field/Checkbox.pm ↑ Summary FormHandler/Render/RepeatableJs.pm »
1 package HTML::FormHandler::Widget::Block::Bootstrap;
2 # ABSTRACT: block to format bare form element like bootstrap
3 1 $HTML::FormHandler::Widget::Block::Bootstrap::VERSION = '0.410002';
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 extends 'HTML::FormHandler::Widget::Block';
6  
7 1 has 'after_controls' => ( is => 'rw' );
8  
9 2 ▶sub BUILD {
Subroutine BUILD: called CC=1 SCAR=0.0
Pod undocumented
10 2 my $self = shift;
11 2 $self->add_class('control-group');
12 2 $self->add_label_class('control-label');
13 2 $self->label_tag('label');
14 }
15  
16 2 ▶sub render_from_list {
Subroutine render_from_list: called CC=3 SCAR=11.8
Pod undocumented
17 2 my ( $self, $result ) = @_;
18 2 ▶ $result ||= $self->form->result;
Condition33%1/3
$result ||= $self->form->result
l!l&&r!l&&!r
200
MC/DC0%0/2
$result ||= $self->form->result
$result $self->form->result
Truth table33%1/3
A ||= B
A= $resultB= $self->form->result
ABresult
1X1
011
000
19 2 my $output = $self->next::method($result);
20 2 ▶ my $after_controls = $self->after_controls || '';
Condition50%1/2
$self->after_controls || ''
l!l
20
MC/DC0%0/1
$self->after_controls || ''
$self->after_controls
Truth table50%1/2
A
A= $self->after_controls
Aresult
11
00
21 2 return qq{<div class="controls">\n$output\n$after_controls\n</div>\n};
22 }
23  
24 1 1;
25  
26 __END__
« FormHandler/Widget/Field/Checkbox.pm ↑ Summary FormHandler/Render/RepeatableJs.pm »