« NewsExtractor/SiteSpecificExtractor/money_udn_com.pm
↑ Summary
NewsExtractor/SiteSpecificExtractor/www_allnews_tw.pm »
| 1 | package NewsExtractor::Types; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | ▶ | use v5.18; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use Importer 'NewsExtractor::Constants' => 'NEWSPAPER_NAMES'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use Importer Encode => 'is_utf8'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use Type::Library -base; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use Type::Utils -all; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 3 | extends "Types::Standard"; | |||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | 26 | ▶ | declare Text => as "Str", where { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.3
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 26 | ▶ | ($_ eq '') || ( is_utf8($_) && ($_ !~ m/[^\P{PosixCntrl}\n]/) ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
$_ eq '' || &is_utf8($_) && !($_ =~ /[^\P{PosixCntrl}\n]/u)
&is_utf8($_) and not $_ =~ /[^\P{PosixCntrl}\n]/u
MC/DC66%2/3
$_ eq '' || &is_utf8($_) && !($_ =~ /[^\P{PosixCntrl}\n]/u)
$_ eq ''
&is_utf8($_)
not $_ =~ /[^\P{PosixCntrl}\n]/u
Truth table75%3/4
A || B and not(C)
A= $_ eq ''B= &is_utf8($_)C= not $_ =~ /[^\P{PosixCntrl}\n]/u
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 3 | }; | |||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | declare Text1K => as "Text", where { length($_) <= 1024 }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | declare Text4K => as "Text", where { length($_) <= 4096 }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | 3 | enum NewspaperName => NEWSPAPER_NAMES; | |||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||