| 1 | package IP::Info::Response::Location; | ||
| 2 | |||
| 3 | 6 | $IP::Info::Response::Location::VERSION = '0.16'; | |
| 4 | 6 | $IP::Info::Response::Location::AUTHORITY = 'cpan:MANWAR'; | |
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | IP::Info::Response::Location - Placeholder for Location for the module L<IP::Info::Response>. | ||
| 9 | |||
| 10 | =head1 VERSION | ||
| 11 | |||
| 12 | Version 0.16 | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | 6 | ▶ | use Data::Dumper; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 6 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 6 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 6 | has 'country_code'=> (is => 'ro'); | |
| 22 | 6 | has 'country_cf' => (is => 'ro'); | |
| 23 | 6 | has 'country' => (is => 'ro'); | |
| 24 | 6 | has 'city_cf' => (is => 'ro'); | |
| 25 | 6 | has 'city' => (is => 'ro'); | |
| 26 | 6 | has 'postal_code' => (is => 'ro'); | |
| 27 | 6 | has 'time_zone' => (is => 'ro'); | |
| 28 | 6 | has 'area_code' => (is => 'ro'); | |
| 29 | 6 | has 'state_code' => (is => 'ro'); | |
| 30 | 6 | has 'state_cf' => (is => 'ro'); | |
| 31 | 6 | has 'state' => (is => 'ro'); | |
| 32 | 6 | has 'continent' => (is => 'ro'); | |
| 33 | 6 | has 'longitude' => (is => 'ro'); | |
| 34 | 6 | has 'latitude' => (is => 'ro'); | |
| 35 | 6 | has 'region' => (is => 'ro'); | |
| 36 | 6 | has 'msa' => (is => 'ro'); | |
| 37 | 6 | has 'dma' => (is => 'ro'); | |
| 38 | |||
| 39 | sub BUILD { | ||
| 40 | 0 | ▶ | my ($self, $param) = @_; |
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 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<< <mohammad.anwar at yahoo.com> >> | ||
| 122 | |||
| 123 | =head1 REPOSITORY | ||
| 124 | |||
| 125 | L<https://github.com/manwar/IP-Info> | ||
| 126 | |||
| 127 | =head1 BUGS | ||
| 128 | |||
| 129 | Please report any bugs or feature requests to C<bug-ip-info at rt.cpan.org> or | ||
| 130 | through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IP-Info>. | ||
| 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<http://rt.cpan.org/NoAuth/Bugs.html?Dist=IP-Info> | ||
| 147 | |||
| 148 | =item * AnnoCPAN: Annotated CPAN documentation | ||
| 149 | |||
| 150 | L<http://annocpan.org/dist/IP-Info> | ||
| 151 | |||
| 152 | =item * CPAN Ratings | ||
| 153 | |||
| 154 | L<http://cpanratings.perl.org/d/IP-Info> | ||
| 155 | |||
| 156 | =item * Search CPAN | ||
| 157 | |||
| 158 | L<http://search.cpan.org/dist/IP-Info/> | ||
| 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<http://www.perlfoundation.org/artistic_license_2_0> | ||
| 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 | 6 | 1; # End of IP::Info::Response::Location | |