Skip Menu |

This queue is for tickets about the Geo-IP2Location CPAN distribution.

Report information
The Basics
Id: 70711
Status: resolved
Priority: 0/
Queue: Geo-IP2Location

Owner: hexasoft [...]
Requestors: NEILB [...]

Bug Information
Severity: Wishlist
Broken in: 2.10
Fixed in: 8.00

Subject: Add a get_country method to get code and name in one call
Download (untitled) / with headers
text/plain 521b
It would be helpful if the module provided a get_country() method, which returns a simple data object, from which you could get both ISO country code and country name. For example: $gi = Geo::IP2Location->open('IP-COUNTRY.BIN'); $country = $gi->get_country($ip); $code = $country->code; $name = $country->name; The Country class could be as simple as: package Geo::IP2Location::Country; use Mouse; has 'code' => (is => 'r', isa => 'Str'); has 'name' => (is => 'r', isa => 'Str'); 1;
We will look into the data type in the next release.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to