blib/lib/NewsExtractor/SiteSpecificExtractor/www_ustv_com_tw.pm

filter: Statementstmt 64.7% 11 / 17 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 50.0% 14 / 28 CC 4 SCAR 24.7
CC
4
Cov
48%
dateline
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« blib/lib/NewsExtractor/SiteSpecificExtractor/www_setn_com.pm ↑ Summary blib/lib/NewsExtractor/Download.pm »
1 package NewsExtractor::SiteSpecificExtractor::www_ustv_com_tw;
2 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 extends 'NewsExtractor::GenericExtractor';
6  
7 1 ▶use Importer 'NewsExtractor::TextUtil' => qw(reformat_dateline);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub dateline {
10 0 ▶ my ($self) = @_;
Subroutine dateline: not called CC=4 SCAR=30.0
Pod undocumented
11 0 ▶ my $el = $self->dom->at('#share0') or return;
Branch: 1 branch
BranchTrueFalseTotal
my $el = $self->dom->at("#share0") or return 0 0 0
12 0 ▶ $el = $el->next() or return;
Branch: 1 branch
BranchTrueFalseTotal
$el = $el->next or return 0 0 0
13 0 my ($x) = $el->all_text =~ m/發佈日期:\s+(\S+?)\s+觀看次數/sm;
14 0 ▶ $x or return;
Branch: 1 branch
BranchTrueFalseTotal
$x or return 0 0 0
15 0 return reformat_dateline($x, '+08:00');
16 }
17  
18 1 1;
« blib/lib/NewsExtractor/SiteSpecificExtractor/www_setn_com.pm ↑ Summary blib/lib/NewsExtractor/Download.pm »