File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/www_epochtimes_com.pm
Criterion Covered Total %
statement 6 12 50.0
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 18 44.4


line stmt bran cond sub pod time code
1             package NewsExtractor::SiteSpecificExtractor::www_epochtimes_com;
2 1     1   9 use utf8;
  1         3  
  1         6  
3 1     1   33 use Moo;
  1         3  
  1         6  
4             extends 'NewsExtractor::GenericExtractor';
5              
6             sub journalist {
7 0     0 0   my ($self) = @_;
8 0           my $text = $self->content_text;
9 0           my ($name) = $text =~ m{((?:大紀元記者|大纪元记者) (\p{Letter}+?) (?:综合|綜合|编译|編譯)?(?:报导|報導))}x;
10              
11 0 0         unless ($name) {
12 0           ($name) = $text =~ m{(?:責任編輯:|责任编辑:)(\p{Letter}+)#\z}x;
13             }
14 0           return $name;
15             }
16              
17             1;