line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## no critic (Subroutines::ProhibitExportingUndeclaredSubs) |
2
|
|
|
|
|
|
|
package WebService::MinFraud::Types; |
3
|
|
|
|
|
|
|
|
4
|
12
|
|
|
12
|
|
73
|
use strict; |
|
12
|
|
|
|
|
33
|
|
|
12
|
|
|
|
|
317
|
|
5
|
12
|
|
|
12
|
|
57
|
use warnings; |
|
12
|
|
|
|
|
20
|
|
|
12
|
|
|
|
|
516
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.010000'; |
8
|
|
|
|
|
|
|
|
9
|
12
|
|
|
12
|
|
4647
|
use Sub::Quote qw( quote_sub ); |
|
12
|
|
|
|
|
45717
|
|
|
12
|
|
|
|
|
609
|
|
10
|
|
|
|
|
|
|
|
11
|
12
|
|
|
12
|
|
83
|
use namespace::clean; |
|
12
|
|
|
|
|
29
|
|
|
12
|
|
|
|
|
80
|
|
12
|
|
|
|
|
|
|
|
13
|
12
|
|
|
|
|
1198
|
use GeoIP2::Types 2.006001 qw( |
14
|
|
|
|
|
|
|
ArrayRef |
15
|
|
|
|
|
|
|
Bool |
16
|
|
|
|
|
|
|
BoolCoercion |
17
|
|
|
|
|
|
|
HTTPStatus |
18
|
|
|
|
|
|
|
HashRef |
19
|
|
|
|
|
|
|
IPAddress |
20
|
|
|
|
|
|
|
JSONObject |
21
|
|
|
|
|
|
|
LocalesArrayRef |
22
|
|
|
|
|
|
|
MaxMindID |
23
|
|
|
|
|
|
|
NonNegativeInt |
24
|
|
|
|
|
|
|
Num |
25
|
|
|
|
|
|
|
Str |
26
|
|
|
|
|
|
|
URIObject |
27
|
|
|
|
|
|
|
UserAgentObject |
28
|
|
|
|
|
|
|
object_isa_type |
29
|
12
|
|
|
12
|
|
7020
|
); |
|
12
|
|
|
|
|
894126
|
|
30
|
|
|
|
|
|
|
|
31
|
12
|
|
|
12
|
|
98
|
use Exporter qw( import ); |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
1671
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
34
|
|
|
|
|
|
|
ArrayRef |
35
|
|
|
|
|
|
|
Bool |
36
|
|
|
|
|
|
|
BoolCoercion |
37
|
|
|
|
|
|
|
HTTPStatus |
38
|
|
|
|
|
|
|
HashRef |
39
|
|
|
|
|
|
|
IPAddress |
40
|
|
|
|
|
|
|
IssuerObject |
41
|
|
|
|
|
|
|
IssuerObjectCoercion |
42
|
|
|
|
|
|
|
JSONObject |
43
|
|
|
|
|
|
|
LocalesArrayRef |
44
|
|
|
|
|
|
|
MaxMindID |
45
|
|
|
|
|
|
|
NonNegativeInt |
46
|
|
|
|
|
|
|
NonNegativeNum |
47
|
|
|
|
|
|
|
Num |
48
|
|
|
|
|
|
|
Str |
49
|
|
|
|
|
|
|
URIObject |
50
|
|
|
|
|
|
|
UserAgentObject |
51
|
|
|
|
|
|
|
object_isa_type |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => \@EXPORT_OK ); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
## no critic (NamingConventions::Capitalization, ValuesAndExpressions::ProhibitImplicitNewlines) |
57
|
|
|
|
|
|
|
sub IssuerObject () { |
58
|
4
|
|
|
4
|
0
|
18
|
return quote_sub( |
59
|
|
|
|
|
|
|
q{ WebService::MinFraud::Types::object_isa_type( $_[0], 'WebService::MinFraud::Record::Issuer' ) } |
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub IssuerObjectCoercion () { |
64
|
4
|
|
|
4
|
0
|
222
|
return quote_sub( |
65
|
|
|
|
|
|
|
q{ |
66
|
|
|
|
|
|
|
defined $_[0] |
67
|
|
|
|
|
|
|
&& Scalar::Util::blessed($_[0]) |
68
|
|
|
|
|
|
|
&& $_[0]->isa('WebService::MinFraud::Record::Issuer') |
69
|
|
|
|
|
|
|
? $_[0] |
70
|
|
|
|
|
|
|
: WebService::MinFraud::Record::Issuer->new($_[0]); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub NonNegativeNum () { |
76
|
4
|
|
|
4
|
0
|
15
|
return quote_sub( |
77
|
|
|
|
|
|
|
q{ GeoIP2::Types::_tc_fail( $_[0], 'NonNegativeNum' ) |
78
|
|
|
|
|
|
|
unless defined $_[0] |
79
|
|
|
|
|
|
|
&& ! ref $_[0] |
80
|
|
|
|
|
|
|
&& $_[0] =~ /^-?\d+(\.\d+)?$/ |
81
|
|
|
|
|
|
|
&& $_[0] >= 0; } |
82
|
|
|
|
|
|
|
); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
# ABSTRACT: Custom types for the MaxMind minFraud service |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__END__ |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=pod |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=encoding UTF-8 |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 NAME |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
WebService::MinFraud::Types - Custom types for the MaxMind minFraud service |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 VERSION |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
version 1.010000 |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 SUPPORT |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 AUTHOR |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Mateu Hunter <mhunter@maxmind.com> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This software is copyright (c) 2015 - 2020 by MaxMind, Inc. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
116
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |