File Coverage

blib/lib/WebService/MinFraud/Role/Data/Rx/Type.pm
Criterion Covered Total %
statement 19 20 95.0
branch 1 2 50.0
condition 1 2 50.0
subroutine 6 6 100.0
pod 0 1 0.0
total 27 31 87.1


line stmt bran cond sub pod time code
1             package WebService::MinFraud::Role::Data::Rx::Type;
2              
3 2     2   1010 use strict;
  2         4  
  2         58  
4 2     2   10 use warnings;
  2         3  
  2         48  
5 2     2   9 use Role::Tiny;
  2         5  
  2         12  
6 2     2   301 use namespace::autoclean;
  2         5  
  2         25  
7              
8             our $VERSION = '1.009001';
9              
10 2     2   164 use Carp ();
  2         5  
  2         260  
11              
12             requires 'type_uri';
13              
14             sub guts_from_arg {
15 255     255 0 162613 my ( $class, $arg ) = @_;
16 255   50     739 $arg ||= {};
17              
18 255 50       758 if ( my @unexpected = keys %$arg ) {
19 0         0 Carp::croak sprintf 'Unknown arguments %s in constructing %s',
20             ( join ',' => @unexpected ), $class->type_uri;
21             }
22              
23 255         667 return {};
24             }
25              
26             1;
27              
28             # ABSTRACT: A role that helps build Data::Rx Types
29              
30             __END__
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             WebService::MinFraud::Role::Data::Rx::Type - A role that helps build Data::Rx Types
39              
40             =head1 VERSION
41              
42             version 1.009001
43              
44             =head1 SUPPORT
45              
46             Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>.
47              
48             =head1 AUTHOR
49              
50             Mateu Hunter <mhunter@maxmind.com>
51              
52             =head1 COPYRIGHT AND LICENSE
53              
54             This software is copyright (c) 2015 - 2019 by MaxMind, Inc.
55              
56             This is free software; you can redistribute it and/or modify it under
57             the same terms as the Perl 5 programming language system itself.
58              
59             =cut