NewsExtractor/SiteSpecificExtractor/hk_on_cc.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 63.6% 14 / 22 CC 2 SCAR 11.0
CC
2
Cov
65%
dateline
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« NewsExtractor/SiteSpecificExtractor/hk_crntt_com.pm ↑ Summary NewsExtractor/SiteSpecificExtractor/news_cctv_com.pm »
1 package NewsExtractor::SiteSpecificExtractor::hk_on_cc;
2 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends 'NewsExtractor::GenericExtractor';
5  
6 1 ▶use Importer 'NewsExtractor::TextUtil' => qw(u normalize_whitespace);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub dateline {
Subroutine dateline: not called CC=2 SCAR=17.9
Pod undocumented
9 0 my ($self) = @_;
10 0 ▶ my $el = $self->dom->at('div.toolBar > span.datetime') or return;
Branch: 1 branch
BranchTrueFalseTotal
my $el = $self->dom->at("div.toolBar > span.datetime") or return 0 0 0
11  
12 0 my @t = split /[^0-9]+/, normalize_whitespace($el->all_text);
13 0 return u(
14 sprintf(
15 '%04d-%02d-%02dT%02d:%02d:%02d+08:00',
16 $t[0], $t[1], $t[2], $t[3], $t[4],
17 0
18 )
19 );
20 }
21  
22 1 1;
« NewsExtractor/SiteSpecificExtractor/hk_crntt_com.pm ↑ Summary NewsExtractor/SiteSpecificExtractor/news_cctv_com.pm »