| 1 | package Org::Element::TableRow; | ||||||||||
| 2 | |||||||||||
| 3 | 6 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use locale; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 6 | extends 'Org::Element'; | |||||||||
| 7 | |||||||||||
| 8 | 6 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||
| 9 | 6 | our $DATE = '2026-07-21'; # DATE | |||||||||
| 10 | 6 | our $DIST = 'Org-Parser'; # DIST | |||||||||
| 11 | 6 | our $VERSION = '0.563'; # VERSION | |||||||||
| 12 | |||||||||||
| 13 | 1 | ▶ | sub as_string { | ||||||||
|
Subroutine
as_string: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 14 | 1 | my ($self) = @_; | |||||||||
| 15 | 1 | ▶ | return $self->_str if defined $self->_str; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | |||||||||||
| 17 | join("", | ||||||||||
| 18 | "|", | ||||||||||
| 19 | 1 | join("|", map {$_->as_string} @{$self->children}), | |||||||||
| 20 | "\n"); | ||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 5 | ▶ | sub as_array { | ||||||||
|
Subroutine
as_array: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 24 | 5 | my ($self) = @_; | |||||||||
| 25 | |||||||||||
| 26 | 5 | [map {$_->as_string} @{$self->children}]; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 1 | ▶ | sub cells { | ||||||||
|
Subroutine
cells: called CC=4 SCAR=14.1
Pod
documented
| |||||||||||
| 30 | 1 | my ($self) = @_; | |||||||||
| 31 | 1 | ▶ | return [] unless $self->children; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | |||||||||||
| 33 | 1 | my $cells = []; | |||||||||
| 34 | 1 | for my $el (@{$self->children}) { | |||||||||
| 35 | 3 | ▶ | push @$cells, $el if $el->isa('Org::Element::TableCell'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | } | ||||||||||
| 37 | 1 | $cells; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 6 | 1; | |||||||||
| 41 | # ABSTRACT: Represent Org table row | ||||||||||
| 42 | |||||||||||
| 43 | __END__ | ||||||||||