NewsExtractor/SiteSpecificExtractor/turnnewsapp_com.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/ETtoday.pm ↑ Summary NewsExtractor/SiteSpecificExtractor/www_bcc_com_tw.pm »
1 package NewsExtractor::SiteSpecificExtractor::turnnewsapp_com;
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{(記者/?(\p{Letter}+))\z},
11 qr{\n((中國時報/.+))(?:\n|\z)},
12 qr{((記者/.+?))\z},
13 qr{((特派員.+?))\z},
14 );
15  
16 0 my $name;
17 0 for my $pat (@patterns) {
18 0 ($name) = $text =~ $pat;
19 0 ▶ last if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
20 }
21 0 return $name;
22 }
23  
24 1 1;
« NewsExtractor/SiteSpecificExtractor/ETtoday.pm ↑ Summary NewsExtractor/SiteSpecificExtractor/www_bcc_com_tw.pm »