blib/lib/Rose/HTML/Form/Field/Checkbox.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond 50.0% 4 / 8 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 6 / 6 Podpod 100% 4 / 4 totaltotal 80.9% 34 / 42 CC 5 SCAR 8.8
CC
5
Cov
86%
html_field
3.3
xhtml_field
3.3
BEGIN
1.0
CRAP 2.4
« blib/lib/Rose/HTML/Form/Field/DateTime/Split/MDYHMS.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/RadioButton.pm »
1 package Rose::HTML::Form::Field::Checkbox;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 6 ▶use base 'Rose::HTML::Form::Field::OnOff::Checkable';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 our $VERSION = '0.617';
8  
9 6 __PACKAGE__->delete_valid_html_attrs(qw(ismap usemap alt src));
10 6 __PACKAGE__->required_html_attr_value(type => 'checkbox');
11  
12 sub html_checkbox
13 124 ▶{
Subroutine html_checkbox: called CC=1 SCAR=0.0
Pod documented
14 124 my($self) = shift;
15 124 $self->html_attr(checked => $self->checked);
16 124 return $self->SUPER::html_field(@_);
17 }
18  
19 sub xhtml_checkbox
20 69 ▶{
Subroutine xhtml_checkbox: called CC=1 SCAR=0.0
Pod documented
21 69 my($self) = shift;
22 69 $self->html_attr(checked => $self->checked);
23 69 return $self->SUPER::xhtml_field(@_);
24 }
25  
26 sub html_field
27 121 ▶{
Subroutine html_field: called CC=3 SCAR=12.0
Pod documented
28 121 my($self) = shift;
29  
30 121 ▶ return ($self->html_prefix || '') .
Condition50%2/4
$self->html_prefix || ''
l!l
0121
$self->html_suffix || ''
l!l
0121
MC/DC0%0/1
$self->html_prefix || ''
$self->html_prefix
MC/DC0%0/1
$self->html_suffix || ''
$self->html_suffix
Truth table50%1/2
A
A= $self->html_prefix
Aresult
11
00
Truth table50%1/2
A
A= $self->html_suffix
Aresult
11
00
31 $self->html_checkbox . ' ' . $self->html_label .
32 ($self->html_suffix || '');
33 }
34  
35 sub xhtml_field
36 66 ▶{
Subroutine xhtml_field: called CC=3 SCAR=12.0
Pod documented
37 66 my($self) = shift;
38 66 ▶ return ($self->html_prefix || '') .
Condition50%2/4
$self->html_prefix || ''
l!l
066
$self->html_suffix || ''
l!l
066
MC/DC0%0/1
$self->html_prefix || ''
$self->html_prefix
MC/DC0%0/1
$self->html_suffix || ''
$self->html_suffix
Truth table50%1/2
A
A= $self->html_prefix
Aresult
11
00
Truth table50%1/2
A
A= $self->html_suffix
Aresult
11
00
39 $self->xhtml_checkbox . ' ' . $self->html_label .
40 ($self->html_suffix || '');
41 }
42  
43 6 1;
44  
45 __END__
« blib/lib/Rose/HTML/Form/Field/DateTime/Split/MDYHMS.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/RadioButton.pm »