se warnings;
use utf8;
our $VERSION = '1.0';
use Data::Dumper;
use WWW::Mechanize;
use JSON::XS qw(decode_json);
sub new($proto, %config) {
my $class = ref($proto) || $proto;
my $self = bl
my $url = "http://ip-api.com/json/" . $ip;
my $content = $self->_fetchURL($url);
my $ok = 0;
my $decoded;
eval {
$decoded = decode_json($content);
$ok = 1;
}
if(!$ok || !defined($decoded)) {
$self->_debuglog("Failed to decode response. Not a JSON document?");
$self->_debuglog(Dumper($decoded));
return;
}
#$self->_debu