| 1 | package HTML::TableContent::Table::Row::Cell; | ||||||||||
| 2 | |||||||||||
| 3 | 20 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 20 | our $VERSION = '1.00'; | |||||||||
| 6 | |||||||||||
| 7 | 20 | extends 'HTML::TableContent::Element'; | |||||||||
| 8 | |||||||||||
| 9 | 20 | has header => ( is => 'rw' ); | |||||||||
| 10 | |||||||||||
| 11 | 20 | has '+html_tag' => ( | |||||||||
| 12 | default => 'td', | ||||||||||
| 13 | ); | ||||||||||
| 14 | |||||||||||
| 15 | around _render_element => sub { | ||||||||||
| 16 | 430 | ▶ | my ( $orig, $self ) = (shift, shift); | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 17 | |||||||||||
| 18 | 430 | my $text = $self->$orig(@_); | |||||||||
| 19 | |||||||||||
| 20 | 430 | ▶ | if ($self->has_nested) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 1 | my @nested = map { $_->render } $self->all_nested; | |||||||||
| 22 | 1 | my $nest = sprintf '%s' x @nested, @nested; | |||||||||
| 23 | 1 | $text = sprintf '%s%s', $text, $nest; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 430 | return $text; | |||||||||
| 27 | 20 | }; | |||||||||
| 28 | |||||||||||
| 29 | sub header_template_attr { | ||||||||||
| 30 | 3 | ▶ | return $_[0]->header->template_attr; | ||||||||
|
Subroutine
header_template_attr: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | sub header_text { | ||||||||||
| 34 | 0 | ▶ | return $_[0]->header->text; | ||||||||
|
Subroutine
header_text: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 20 | __PACKAGE__->meta->make_immutable; | |||||||||
| 38 | |||||||||||
| 39 | 20 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||