blib/lib/Rose/HTML/Form/Field/RadioButton.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/Checkbox.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/Email.pm »
1 package Rose::HTML::Form::Field::RadioButton;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 7 ▶use base 'Rose::HTML::Form::Field::OnOff::Checkable';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 7 our $VERSION = '0.606';
8  
9 7 __PACKAGE__->delete_valid_html_attrs(qw(ismap usemap alt src));
10 7 __PACKAGE__->required_html_attr_value(type => 'radio');
11  
12 sub html_radio_button
13 120 ▶{
Subroutine html_radio_button: called CC=1 SCAR=0.0
Pod documented
14 120 my($self) = shift;
15 120 $self->html_attr(checked => $self->checked);
16 120 return $self->SUPER::html_field(@_);
17 }
18  
19 sub xhtml_radio_button
20 75 ▶{
Subroutine xhtml_radio_button: called CC=1 SCAR=0.0
Pod documented
21 75 my($self) = shift;
22 75 $self->html_attr(checked => $self->checked);
23 75 return $self->SUPER::xhtml_field(@_);
24 }
25  
26 sub html_field
27 120 ▶{
Subroutine html_field: called CC=3 SCAR=12.0
Pod documented
28 120 my($self) = shift;
29  
30 120 ▶ return ($self->html_prefix || '') .
Condition50%2/4
$self->html_prefix || ''
l!l
0120
$self->html_suffix || ''
l!l
0120
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_radio_button . ' ' . $self->html_label .
32 ($self->html_suffix || '');
33 }
34  
35 sub xhtml_field
36 75 ▶{
Subroutine xhtml_field: called CC=3 SCAR=12.0
Pod documented
37 75 my($self) = shift;
38 75 ▶ return ($self->html_prefix || '') .
Condition50%2/4
$self->html_prefix || ''
l!l
075
$self->html_suffix || ''
l!l
075
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_radio_button . ' ' . $self->html_label .
40 ($self->html_suffix || '');
41 }
42  
43 7 1;
44  
45 __END__
« blib/lib/Rose/HTML/Form/Field/Checkbox.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/Email.pm »