| 1 | package Feed::Data::Parser::Table; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use Moo; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | extends 'Feed::Data::Parser::Base'; | |||||||||||
| 5 | 1 | ▶ | use Compiled::Params::OO qw/cpo/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 1 | ▶ | use Types::Standard qw/Object HashRef Str/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use HTML::TableContent; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | our $validate; | |||||||||||
| 10 | BEGIN { | ||||||||||||
| 11 | 1 | ▶ | $validate = cpo( | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | get_value => [Object, HashRef, Str], | ||||||||||||
| 13 | ); | ||||||||||||
| 14 | } | ||||||||||||
| 15 | |||||||||||||
| 16 | has '+parser' => ( | ||||||||||||
| 17 | default => sub { | ||||||||||||
| 18 | 1 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 19 | 1 | my $content = $self->content_ref; | |||||||||||
| 20 | 1 | my $t = HTML::TableContent->new(); | |||||||||||
| 21 | 1 | $t->parse($$content); | |||||||||||
| 22 | 1 | return { items => $t->get_first_table->aoh }; | |||||||||||
| 23 | }, | ||||||||||||
| 24 | 1 | ); | |||||||||||
| 25 | |||||||||||||
| 26 | sub get_value { | ||||||||||||
| 27 | 22 | ▶ | my ($self, $item, $action) = $validate->get_value->(@_); | ||||||||||
|
Subroutine
get_value: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 28 | 22 | my $value = $item->{$action}; | |||||||||||
| 29 | 22 | ▶ | return $value // ''; | ||||||||||
|
Condition100%2/2
$value // ""
MC/DC100%1/1
$value // ""
$value
Truth table100%2/2
A
A= $value
| |||||||||||||
| 30 | } | ||||||||||||
| 31 | |||||||||||||
| 32 | 1 | 1; # End of Feed::Data | |||||||||||