File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/www_ustv_com_tw.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 6 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 26 46.1


line stmt bran cond sub pod time code
1             use utf8;
2 1     1   6  
  1         2  
  1         5  
3             use Moo;
4 1     1   26 extends 'NewsExtractor::GenericExtractor';
  1         2  
  1         4  
5              
6             use Importer 'NewsExtractor::TextUtil' => qw(reformat_dateline);
7 1     1   302  
  1         2  
  1         5  
8             my ($self) = @_;
9             my $el = $self->dom->at('#share0') or return;
10 0     0 0   $el = $el->next() or return;
11 0 0         my ($x) = $el->all_text =~ m/發佈日期:\s+(\S+?)\s+觀看次數/sm;
12 0 0         $x or return;
13 0           return reformat_dateline($x, '+08:00');
14 0 0         }
15 0            
16             1;