line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GeoIP2::Model::ISP; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
48
|
use strict; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
201
|
|
4
|
7
|
|
|
7
|
|
33
|
use warnings; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
254
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '2.006002'; |
7
|
|
|
|
|
|
|
|
8
|
7
|
|
|
7
|
|
37
|
use Moo; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
42
|
|
9
|
|
|
|
|
|
|
|
10
|
7
|
|
|
7
|
|
2273
|
use GeoIP2::Types qw( IPAddress NonNegativeInt Str ); |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
552
|
|
11
|
|
|
|
|
|
|
|
12
|
7
|
|
|
7
|
|
45
|
use namespace::clean -except => 'meta'; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
68
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'GeoIP2::Role::Model::Flat', 'GeoIP2::Role::HasIPAddress'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has autonomous_system_number => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => NonNegativeInt, |
19
|
|
|
|
|
|
|
predicate => 'has_autonomous_system_number', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has autonomous_system_organization => ( |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
isa => Str, |
25
|
|
|
|
|
|
|
predicate => 'has_autonomous_system_organization', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has isp => ( |
29
|
|
|
|
|
|
|
is => 'ro', |
30
|
|
|
|
|
|
|
isa => Str, |
31
|
|
|
|
|
|
|
predicate => 'has_isp', |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has organization => ( |
35
|
|
|
|
|
|
|
is => 'ro', |
36
|
|
|
|
|
|
|
isa => Str, |
37
|
|
|
|
|
|
|
predicate => 'has_organization', |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# ABSTRACT: Model class for the GeoIP2 ISP database |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=pod |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding UTF-8 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
GeoIP2::Model::ISP - Model class for the GeoIP2 ISP database |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
version 2.006002 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SYNOPSIS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
use 5.008; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use GeoIP2::Model::ISP; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my $isp = GeoIP2::Model::ISP->new( |
65
|
|
|
|
|
|
|
raw => { |
66
|
|
|
|
|
|
|
autonomous_system_number => '217', |
67
|
|
|
|
|
|
|
autonomous_system_organization => 'University of Minnesota', |
68
|
|
|
|
|
|
|
isp => 'University of Minnesota', |
69
|
|
|
|
|
|
|
organization => 'University of Minnesota', |
70
|
|
|
|
|
|
|
ip_address => '128.101.101.101', |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
print $isp->autonomous_system_number(), "\n"; |
75
|
|
|
|
|
|
|
print $isp->autonomous_system_organization(), "\n"; |
76
|
|
|
|
|
|
|
print $isp->isp(), "\n"; |
77
|
|
|
|
|
|
|
print $isp->organization(), "\n"; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DESCRIPTION |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This class provides a model for the data returned by the GeoIP2 ISP database. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 METHODS |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This class provides the following methods: |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 $isp->autonomous_system_number() |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This returns the autonomous system number |
90
|
|
|
|
|
|
|
(L<http://en.wikipedia.org/wiki/Autonomous_system_(Internet)>) associated with |
91
|
|
|
|
|
|
|
the IP address. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 $isp->autonomous_system_organization() |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This returns the organization associated with the registered autonomous system |
96
|
|
|
|
|
|
|
number (L<http://en.wikipedia.org/wiki/Autonomous_system_(Internet)>) for the IP |
97
|
|
|
|
|
|
|
address. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 $isp->ip_address() |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Returns the IP address used in the lookup. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 $isp->isp() |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This returns the name of the ISP associated with the IP address. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 $isp->organization() |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This returns the name of the organization associated with the IP address. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 SUPPORT |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/GeoIP2-perl/issues>. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 AUTHORS |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=over 4 |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item * |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Dave Rolsky <drolsky@maxmind.com> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Greg Oschwald <goschwald@maxmind.com> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item * |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Mark Fowler <mfowler@maxmind.com> |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item * |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Olaf Alders <oalders@maxmind.com> |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=back |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
This software is copyright (c) 2013 - 2019 by MaxMind, Inc. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
142
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=cut |