File Coverage

lib/Web/NewsAPI/Types.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Web::NewsAPI::Types;
2              
3 1     1   7 use Moose::Util::TypeConstraints;
  1         3  
  1         11  
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;