line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
3
|
1
|
|
|
1
|
|
26
|
extends 'NewsExtractor::GenericExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
my ($self) = @_; |
6
|
|
|
|
|
|
|
my $text = $self->content_text; |
7
|
0
|
|
|
0
|
0
|
|
my @patterns = ( |
8
|
0
|
|
|
|
|
|
qr{(?:\n|\A)(?:實習)? 記者 ([\p{Letter}、]+?) / (?:[\p{Letter}—]+)? (?:報導|編譯) \n}x, |
9
|
0
|
|
|
|
|
|
qr{(?:\n|\A)網搜小組/([\p{Letter}、]+)報導\n}, |
10
|
|
|
|
|
|
|
qr{\b((?:圖、)?文/[\p{Letter}\p{Digit}]+)\n}, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $name; |
14
|
|
|
|
|
|
|
for my $pat (@patterns) { |
15
|
0
|
|
|
|
|
|
($name) = $text =~ $pat; |
16
|
0
|
|
|
|
|
|
last if $name; |
17
|
0
|
|
|
|
|
|
} |
18
|
0
|
0
|
|
|
|
|
return $name; |
19
|
|
|
|
|
|
|
} |
20
|
0
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |