| 1 | package Form::Factory::Interface::HTML::Widget::Div; | ||||||||||||
| 2 | 1 | $Form::Factory::Interface::HTML::Widget::Div::VERSION = '0.022'; | |||||||||||
| 3 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 1 | extends qw( Form::Factory::Interface::HTML::Widget::Element ); | |||||||||||
| 6 | |||||||||||||
| 7 | # ABSTRACT: HTML interface widget helper | ||||||||||||
| 8 | |||||||||||||
| 9 | |||||||||||||
| 10 | 1 | has '+tag_name' => ( | |||||||||||
| 11 | default => 'div', | ||||||||||||
| 12 | ); | ||||||||||||
| 13 | |||||||||||||
| 14 | has widgets => ( | ||||||||||||
| 15 | is => 'ro', | ||||||||||||
| 16 | isa => 'ArrayRef', | ||||||||||||
| 17 | required => 1, | ||||||||||||
| 18 | 0 | ▶ | default => sub { [] }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 19 | 1 | ); | |||||||||||
| 20 | |||||||||||||
| 21 | 0 | ▶ | sub has_content { 1 } | ||||||||||
|
Subroutine
has_content: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 22 | |||||||||||||
| 23 | 0 | ▶ | sub render_widgets { | ||||||||||
|
Subroutine
render_widgets: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||
| 24 | 0 | my $self = shift; | |||||||||||
| 25 | 0 | my $content = ''; | |||||||||||
| 26 | 0 | for my $widget (@{ $self->widgets }) { | |||||||||||
| 27 | 0 | $content .= $widget->render; | |||||||||||
| 28 | } | ||||||||||||
| 29 | 0 | return $content; | |||||||||||
| 30 | } | ||||||||||||
| 31 | |||||||||||||
| 32 | 0 | ▶ | override render => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 33 | 0 | my $self = shift; | |||||||||||
| 34 | 0 | return super() . $self->render_widgets; | |||||||||||
| 35 | 1 | }; | |||||||||||
| 36 | |||||||||||||
| 37 | 131 | ▶ | sub consume_control { | ||||||||||
|
Subroutine
consume_control: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||
| 38 | 131 | my $self = shift; | |||||||||||
| 39 | 131 | my %args_accumulator; | |||||||||||
| 40 | |||||||||||||
| 41 | 395 | ▶ | %args_accumulator = (%args_accumulator, %{ $_->consume(@_) || {} }) | ||||||||||
|
Condition100%2/2
$_->consume(@_) || {}
MC/DC100%1/1
$_->consume(@_) || {}
$_->consume(@_)
Truth table100%2/2
A
A= $_->consume(@_)
| |||||||||||||
| 42 | 131 | for @{ $self->widgets }; | |||||||||||
| 43 | |||||||||||||
| 44 | 131 | return \%args_accumulator; | |||||||||||
| 45 | } | ||||||||||||
| 46 | |||||||||||||
| 47 | |||||||||||||
| 48 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 49 | |||||||||||||
| 50 | __END__ | ||||||||||||