File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/ctee_com_tw.pm
Criterion Covered Total %
statement 9 12 75.0
branch n/a
condition 0 2 0.0
subroutine 3 4 75.0
pod 0 1 0.0
total 12 19 63.1


line stmt bran cond sub pod time code
1             package NewsExtractor::SiteSpecificExtractor::ctee_com_tw;
2 1     1   8 use utf8;
  1         3  
  1         8  
3 1     1   34 use Moo;
  1         3  
  1         6  
4             extends 'NewsExtractor::GenericExtractor';
5              
6 1     1   355 use Importer 'NewsExtractor::TextUtil' => qw( normalize_whitespace );
  1         3  
  1         7  
7              
8             sub journalist {
9 0     0 0   my ($self) = @_;
10 0   0       my $text = $self->tx->result->dom->find("div.single-post-meta a")->map('text')->join(" ") // '';
11 0           return normalize_whitespace("". $text);
12             }
13              
14             1;