blib/lib/Web/NewsAPI/Types.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 package Web::NewsAPI::Types;
2  
3 use Moose::Util::TypeConstraints;
4  
5 subtype 'NewsDateTime', as 'DateTime';
6 subtype 'NewsURI', as 'Maybe[URI]';
7  
8 coerce 'NewsDateTime',
9 from 'Str',
10 via { DateTime::Format::ISO8601->parse_datetime( $_ ) };
11  
12 coerce 'NewsURI',
13 from 'Str',
14 via { URI->new( $_ ) };
15  
16  
17 1;