File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/www_penghutimes_com.pm
Criterion Covered Total %
statement 9 17 52.9
branch n/a
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 24 50.0


line stmt bran cond sub pod time code
1             use utf8;
2 1     1   6 use Moo;
  1         2  
  1         5  
3 1     1   25 extends 'NewsExtractor::GenericExtractor';
  1         2  
  1         4  
4              
5             use Importer 'NewsExtractor::TextUtil' => 'reformat_dateline';
6 1     1   264  
  1         2  
  1         5  
7             my ($self) = @_;
8             my $el = $self->dom->at('h1.main-title')->next();
9 0     0 0   my ($t) = $el->all_text() =~ m/記者:\s*(\S+)\s*/;
10 0           return $t;
11 0           }
12 0            
13             my ($self) = @_;
14             my $node = $self->dom->at('h1.main-title')->next()->child_nodes->first;
15             my $t = reformat_dateline("$node", '+08:00');
16 0     0 0   return $t;
17 0           }
18 0            
19 0           1;