| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::AbuseIPDB::Response; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#=============================================================================== |
|
4
|
|
|
|
|
|
|
# FILE: Response.pm |
|
5
|
|
|
|
|
|
|
# DESCRIPTION: Generic Response Object - See POD for details |
|
6
|
|
|
|
|
|
|
# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk |
|
7
|
|
|
|
|
|
|
# ORGANIZATION: Openstrike |
|
8
|
|
|
|
|
|
|
# CREATED: 12/08/19 14:38:21 |
|
9
|
|
|
|
|
|
|
#=============================================================================== |
|
10
|
|
|
|
|
|
|
|
|
11
|
8
|
|
|
8
|
|
3882
|
use strict; |
|
|
8
|
|
|
|
|
17
|
|
|
|
8
|
|
|
|
|
208
|
|
|
12
|
8
|
|
|
8
|
|
36
|
use warnings; |
|
|
8
|
|
|
|
|
15
|
|
|
|
8
|
|
|
|
|
209
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
8
|
|
|
8
|
|
40
|
use WebService::AbuseIPDB; |
|
|
8
|
|
|
|
|
14
|
|
|
|
8
|
|
|
|
|
1109
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = $WebService::AbuseIPDB::VERSION; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
|
19
|
13
|
|
|
13
|
1
|
794
|
my ($class, $res) = @_; |
|
20
|
13
|
100
|
|
|
|
58
|
my $self = |
|
21
|
|
|
|
|
|
|
ref $res |
|
22
|
|
|
|
|
|
|
? $res |
|
23
|
|
|
|
|
|
|
: { |
|
24
|
|
|
|
|
|
|
errors => [ |
|
25
|
|
|
|
|
|
|
{ status => 500, |
|
26
|
|
|
|
|
|
|
detail => 'Client could not connect' |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
] |
|
29
|
|
|
|
|
|
|
}; |
|
30
|
13
|
|
|
|
|
31
|
bless ($self, $class); |
|
31
|
13
|
|
|
|
|
130
|
return $self; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Accessors |
|
35
|
|
|
|
|
|
|
|
|
36
|
12
|
|
|
12
|
1
|
2843
|
sub successful { return not exists shift->{errors} } |
|
37
|
5
|
|
|
5
|
1
|
37
|
sub errors { return shift->{errors} } |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |