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         2  
  1         7  
3 1     1   43 use Moo;
  1         4  
  1         5  
4             extends 'NewsExtractor::GenericExtractor';
5              
6 1     1   351 use Importer 'NewsExtractor::TextUtil' => qw( normalize_whitespace );
  1         3  
  1         6  
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;