File Coverage

blib/lib/IP/Info/Response/Location.pm
Criterion Covered Total %
statement 9 21 42.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 26 46.1


line stmt bran cond sub pod time code
1             package IP::Info::Response::Location;
2              
3             $IP::Info::Response::Location::VERSION = '0.16';
4             $IP::Info::Response::Location::AUTHORITY = 'cpan:MANWAR';
5              
6             =head1 NAME
7              
8             IP::Info::Response::Location - Placeholder for Location for the module L.
9              
10             =head1 VERSION
11              
12             Version 0.16
13              
14             =cut
15              
16 6     6   23 use Data::Dumper;
  6         7  
  6         325  
17              
18 6     6   26 use Moo;
  6         7  
  6         40  
19 6     6   1341 use namespace::clean;
  6         7  
  6         29  
20              
21             has 'country_code'=> (is => 'ro');
22             has 'country_cf' => (is => 'ro');
23             has 'country' => (is => 'ro');
24             has 'city_cf' => (is => 'ro');
25             has 'city' => (is => 'ro');
26             has 'postal_code' => (is => 'ro');
27             has 'time_zone' => (is => 'ro');
28             has 'area_code' => (is => 'ro');
29             has 'state_code' => (is => 'ro');
30             has 'state_cf' => (is => 'ro');
31             has 'state' => (is => 'ro');
32             has 'continent' => (is => 'ro');
33             has 'longitude' => (is => 'ro');
34             has 'latitude' => (is => 'ro');
35             has 'region' => (is => 'ro');
36             has 'msa' => (is => 'ro');
37             has 'dma' => (is => 'ro');
38              
39             sub BUILD {
40 0     0 0   my ($self, $param) = @_;
41              
42 0           $self->{country} = $param->{CountryData}->{country};
43 0           $self->{country_cf} = $param->{CountryData}->{country_cf};
44 0           $self->{country_code} = $param->{CountryData}->{country_code};
45              
46 0           $self->{state} = $param->{StateData}->{state};
47 0           $self->{state_cf} = $param->{StateData}->{state_cf};
48 0           $self->{state_code} = $param->{StateData}->{state_code};
49              
50 0           $self->{city} = $param->{CityData}->{city};
51 0           $self->{city_cf} = $param->{CityData}->{city_cf};
52 0           $self->{postal_code} = $param->{CityData}->{postal_code};
53 0           $self->{area_code} = $param->{CityData}->{area_code};
54 0           $self->{time_zone} = $param->{CityData}->{time_zone};
55             }
56              
57             =head1 METHODS
58              
59             =head2 longitute()
60              
61             Returns the IP Location Longitude.
62              
63             =head2 latitude()
64              
65             Returns the IP Location Latitude.
66              
67             =head2 city_cf()
68              
69             Returns the IP Location City CF.
70              
71             =head2 city()
72              
73             Returns the IP Location City.
74              
75             =head2 postal_code()
76              
77             Returns the IP Location Postal Code.
78              
79             =head2 time_zone()
80              
81             Returns the IP Location Time Zone.
82              
83             =head2 area_code()
84              
85             Returns the IP Location Area Code.
86              
87             =head2 region()
88              
89             Returns the IP Location Region.
90              
91             =head2 continent()
92              
93             Returns the IP Location Continent.
94              
95             =head2 state_code()
96              
97             Returns the IP Location State Code.
98              
99             =head2 state_cf()
100              
101             Returns the IP Location State CF.
102              
103             =head2 state()
104              
105             Returns the IP Location State.
106              
107             =head2 country_code()
108              
109             Returns the IP Location Country Code.
110              
111             =head2 country_cf()
112              
113             Returns the IP Location Country CF.
114              
115             =head2 country()
116              
117             Returns the IP Location Country.
118              
119             =head1 AUTHOR
120              
121             Mohammad S Anwar, C<< >>
122              
123             =head1 REPOSITORY
124              
125             L
126              
127             =head1 BUGS
128              
129             Please report any bugs or feature requests to C or
130             through the web interface at L.
131             I will be notified and then you'll automatically be notified of progress on your
132             bug as I make changes.
133              
134             =head1 SUPPORT
135              
136             You can find documentation for this module with the perldoc command.
137              
138             perldoc IP::Info::Response::Location
139              
140             You can also look for information at:
141              
142             =over 4
143              
144             =item * RT: CPAN's request tracker
145              
146             L
147              
148             =item * AnnoCPAN: Annotated CPAN documentation
149              
150             L
151              
152             =item * CPAN Ratings
153              
154             L
155              
156             =item * Search CPAN
157              
158             L
159              
160             =back
161              
162             =head1 LICENSE AND COPYRIGHT
163              
164             Copyright (C) 2011 - 2016 Mohammad S Anwar.
165              
166             This program is free software; you can redistribute it and/or modify it under
167             the terms of the the Artistic License (2.0). You may obtain a copy of the full
168             license at:
169              
170             L
171              
172             Any use, modification, and distribution of the Standard or Modified Versions is
173             governed by this Artistic License.By using, modifying or distributing the Package,
174             you accept this license. Do not use, modify, or distribute the Package, if you do
175             not accept this license.
176              
177             If your Modified Version has been derived from a Modified Version made by someone
178             other than you,you are nevertheless required to ensure that your Modified Version
179             complies with the requirements of this license.
180              
181             This license does not grant you the right to use any trademark, service mark,
182             tradename, or logo of the Copyright Holder.
183              
184             This license includes the non-exclusive, worldwide, free-of-charge patent license
185             to make, have made, use, offer to sell, sell, import and otherwise transfer the
186             Package with respect to any patent claims licensable by the Copyright Holder that
187             are necessarily infringed by the Package. If you institute patent litigation
188             (including a cross-claim or counterclaim) against any party alleging that the
189             Package constitutes direct or contributory patent infringement,then this Artistic
190             License to you shall terminate on the date that such litigation is filed.
191              
192             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
193             CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
194             WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
195             NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
196             REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
197             INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
198             OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
199              
200             =cut
201              
202             1; # End of IP::Info::Response::Location