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/Types.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.410000';
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 sub BUILD {
10 2 ▶ my $self = shift;
Subroutine BUILD: called CC=1 SCAR=0.0
Pod undocumented
11 2 $self->add_class('control-group');
12 2 $self->add_label_class('control-label');
13 2 $self->label_tag('label');
14 }
15  
16 sub render_from_list {
17 2 ▶ my ( $self, $result ) = @_;
Subroutine render_from_list: called CC=3 SCAR=11.8
Pod undocumented
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__
27  
28 =pod
29  
30 =encoding UTF-8
31  
32 =head1 NAME
33  
34 HTML::FormHandler::Widget::Block::Bootstrap - block to format bare form element like bootstrap
35  
36 =head1 VERSION
37  
38 version 0.410000
39  
40 =head1 AUTHOR
41  
42 FormHandler Contributors - see HTML::FormHandler
43  
44 =head1 COPYRIGHT AND LICENSE
45  
46 This software is copyright (c) 2017 by Gerda Shank.
47  
48 This is free software; you can redistribute it and/or modify it under
49 the same terms as the Perl 5 programming language system itself.
50  
51 =cut
« FormHandler/Widget/Field/Checkbox.pm ↑ Summary FormHandler/Types.pm »