File Coverage

blib/lib/NewsExtractor/Types.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1             use v5.18;
2 3     3   1331  
  3         27  
3             use Importer 'NewsExtractor::Constants' => 'NEWSPAPER_NAMES';
4 3     3   460 use Importer Encode => 'is_utf8';
  3         5509  
  3         15  
5 3     3   81  
  3         6  
  3         12  
6             use Type::Library -base;
7 3     3   783 use Type::Utils -all;
  3         45373  
  3         21  
8 3     3   1446 extends "Types::Standard";
  3         7866  
  3         23  
9              
10             declare Text => as "Str", where {
11             ($_ eq '') || ( is_utf8($_) && ($_ !~ m/[^\P{PosixCntrl}\n]/) )
12 1     1   2807 };
  1         2  
  1         12  
13              
14             declare Text1K => as "Text", where { length($_) <= 1024 };
15             declare Text4K => as "Text", where { length($_) <= 4096 };
16              
17             enum NewspaperName => NEWSPAPER_NAMES;
18              
19             1;