Acme-Free-API-Geodata-GeoIP
view release on metacpan or search on metacpan
lib/Acme/Free/API/Geodata/GeoIP.pm view on Meta::CPAN
}
# internal helpers
# these are copied from CAVACs vast framework. But we don't want hundreds of dependencies in this example code, only a couple of functions
sub _fetchURL($self, $url) {
$self->{agent}->get($url);
if(!$self->{agent}->success()) {
$self->_debuglog("Network error while fetching URL $url");
return;
}
my $response = $self->{agent}->response();
if(!defined($response)) {
$self->_debuglog("Could not get agent response");
return;
}
my $content = $response->decoded_content;
( run in 0.641 second using v1.01-cache-2.11-cpan-65fba6d93b7 )