perl
perl copied to clipboard
Error during library use without token
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?
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.
Hi @UmanShahzad, thanks alot for your support!