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

filter: Statementstmt 96.5% 28 / 29 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 10 / 11 Podpod 75.0% 6 / 8 totaltotal 92.0% 46 / 50 CC 3 SCAR 4.3
CC
3
Cov
97%
hidden
3.0
element
2.0
BEGIN
1.0
CRAP 1.5
« blib/lib/Rose/HTML/Label.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/DateTime/Split.pm »
1 package Rose::HTML::Form::Field::OptionGroup;
2  
3 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 11 ▶use Rose::HTML::Form::Field::Option::Container;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 # XXX: Use runtime inheritance here to avoid race in circular dependency
7 11 our @ISA = qw(Rose::HTML::Form::Field::Option::Container);
8  
9 use Rose::Object::MakeMethods::Generic
10 11 ▶(
Subroutine BEGIN: called CC=1 SCAR=0.0
11 11 scalar => 'name',
12 boolean => 'multiple',
13 11 );
14  
15 11 our $VERSION = '0.606';
16  
17 11 __PACKAGE__->add_required_html_attrs(
18 {
19 label => '',
20 });
21  
22 11 __PACKAGE__->add_boolean_html_attrs('disabled');
23  
24 11 __PACKAGE__->delete_valid_html_attrs(qw(
25 name
26 value
27 onblur
28 onfocus
29 accesskey
30 tabindex));
31  
32 0 ▶sub element { 'optgroup' }
Subroutine element: not called CC=1 SCAR=6.9
Pod documented
33 66 ▶sub html_element { 'optgroup' }
Subroutine html_element: called CC=1 SCAR=0.0
Pod documented
34 32 ▶sub xhtml_element { 'optgroup' }
Subroutine xhtml_element: called CC=1 SCAR=0.0
Pod documented
35  
36 11 ▶sub label { shift->html_attr('label', @_) }
Subroutine label: called CC=1 SCAR=0.0
Pod documented
37  
38 1 ▶sub html { shift->html_field(@_) }
Subroutine html: called CC=1 SCAR=0.0
Pod documented
39 1 ▶sub xhtml { shift->xhtml_field(@_) }
Subroutine xhtml: called CC=1 SCAR=0.0
Pod documented
40  
41 6 ▶sub init_apply_error_class { 0 }
Subroutine init_apply_error_class: called CC=1 SCAR=0.0
Pod undocumented
42  
43 sub hidden
44 34 ▶{
Subroutine hidden: called CC=3 SCAR=11.0
Pod undocumented
45 34 my($self) = shift;
46  
47 34 ▶ if(@_)
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 6 28 34
48 {
49 6 my $bool = shift;
50  
51 6 $self->SUPER::hidden($bool);
52  
53 6 foreach my $option ($self->options)
54 {
55 12 $option->hidden($bool);
56 }
57 }
58  
59 34 return $self->SUPER::hidden(@_);
60 }
61  
62 11 1;
63  
64 __END__
« blib/lib/Rose/HTML/Label.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/DateTime/Split.pm »