perl icon indicating copy to clipboard operation
perl copied to clipboard

Error during library use without token

Open marcoM32 opened this issue 4 years ago • 2 comments

I try to execute the following example present in the documentation:

use Geo::IPinfo;

$ipinfo = Geo::IPinfo->new();
$details = $ipinfo->info('8.8.8.8');

if (defined $details)   # valid data returned
{
  $city = $details->city; # Emeryville
  $loc = $details->loc; # 37.8342,-122.2900
}
else   # invalid data obtained, show error message
{
  print $ipinfo->error_msg . "\n";
}

but without a token the library fails at line 47. It is possible fix it?

immagine

marcoM32 avatar Feb 15 '21 10:02 marcoM32

Hey @marcoM32, thanks for the report. I'll get to solving this soon.

Until then though, you should just signup for the service, which is free, and use a token for 50k free req/month.

UmanShahzad avatar Feb 16 '21 04:02 UmanShahzad

Hi @UmanShahzad, thanks alot for your support!

marcoM32 avatar Feb 16 '21 17:02 marcoM32