eval { require LWP::Simple::WithCache; require JSON::Parse } )) {
$self->_debug("Look up $ip on geoplugin");
LWP::Simple::WithCache->import();
JSON::Parse->import();
if(my $data = LWP::Simpl
e::WithCache::get("http://www.geoplugin.net/json.gp?ip=$ip")) {
$self->{_country} = JSON::Parse::parse_json($data)->{'geoplugin_countryCode'};
}
}
unless($self->{_country}) {
$self->_debug("L
l { require LWP::Simple::WithCache; require JSON::Parse } ) {
$self->_debug("Look up $ip on ip-api.com");
LWP::Simple::WithCache->import();
JSON::Parse->import();
if(my $data = LWP::
utodie qw(:all);
use JSON::MaybeXS;
use File::Glob ':glob';
use File::Slurp;
use File::stat;
use POSIX qw(strftime);
use Readonly;
Readonly my $cover_db => 'cover_db/cover.json';
Readonly my $output
its in the coverage trend graph
# Read and decode coverage data
my $json_text = read_file($cover_db);
my $data = decode_json($json_text);
my $coverage_pct = 0;
my $badge_color = 'red';
if(my $total
} bsd_glob("coverage_history/*.json");
my $prev_data;
if (@history >= 1) {
my $prev_file = $history[-1]; # Most recent before current
eval {
$prev_data = decode_json(read_file($prev_file));
};
}