blib/lib/NewsExtractor/SiteSpecificExtractor/www_idn_com_tw.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 13 | 69.2 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 20 | 60.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | use utf8; | ||||||
2 | 1 | 1 | 7 | use Moo; | |||
1 | 2 | ||||||
1 | 5 | ||||||
3 | 1 | 1 | 25 | extends 'NewsExtractor::GenericExtractor'; | |||
1 | 2 | ||||||
1 | 4 | ||||||
4 | |||||||
5 | use Importer 'NewsExtractor::TextUtil' => qw< reformat_dateline >; | ||||||
6 | 1 | 1 | 254 | ||||
1 | 3 | ||||||
1 | 6 | ||||||
7 | my ($self) = @_; | ||||||
8 | my $text = $self->content_text; | ||||||
9 | 0 | 0 | 0 | my ($ymd) = $text =~ m{ ( [0-9]{4}/[0-9]{1,2}/[0-9]{1,2} ) [\))]?\z}x; | |||
10 | 0 | return $ymd ? reformat_dateline( $ymd, '+08:00' ) : undef; | |||||
11 | 0 | } | |||||
12 | 0 | 0 | |||||
13 | 1; |