NewsExtractor/SiteSpecificExtractor/ETtoday.pm

filter: Statementstmt 50.0% 8 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 45.4% 10 / 22 CC 3 SCAR 20.3
CC
3
Cov
44%
journalist
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
« NewsExtractor/SiteSpecificExtractor/yimedia_com_tw.pm ↑ Summary NewsExtractor/SiteSpecificExtractor/turnnewsapp_com.pm »
1 package NewsExtractor::SiteSpecificExtractor::ETtoday;
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 0 ▶sub journalist {
Subroutine journalist: not called CC=3 SCAR=24.8
Pod undocumented
7 0 my ($self) = @_;
8 0 my $text = $self->content_text;
9 0 my @patterns = (
10 qr{(?:\n|\A)(?:實習)? 記者 ([\p{Letter}、]+?) / (?:[\p{Letter}—]+)? (?:報導|編譯) \n}x,
11 qr{(?:\n|\A)網搜小組/([\p{Letter}、]+)報導\n},
12 qr{\b((?:圖、)?文/[\p{Letter}\p{Digit}]+)\n},
13 );
14  
15 0 my $name;
16 0 for my $pat (@patterns) {
17 0 ($name) = $text =~ $pat;
18 0 ▶ last if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
19 }
20 0 return $name;
21 }
22  
23 1 1;
« NewsExtractor/SiteSpecificExtractor/yimedia_com_tw.pm ↑ Summary NewsExtractor/SiteSpecificExtractor/turnnewsapp_com.pm »