package TimeZone::TimeZoneDB;
use strict;
use warnings;
use Carp;
use CHI;
use JSON::MaybeXS;
use LWP::UserAgent;
use Object::Configure;
use Params::Get 0.13;
use Params::Validate::Strict 0.10;
use
obust error handling, ensuring proper validation of input parameters and secure API interactions.
JSON responses are safely parsed with error handling to prevent crashes.
Designed for flexibility,
it
ader
$uri->query_form(
by => 'position',
lat => $latitude,
lng => $longitude,
format => 'json',
key => $self->{'key'}
);
my $url = $uri->as_string();
# # Set up HTTP headers
# my $req
l
use strict;
use warnings;
use JSON::MaybeXS;
use File::Glob ':glob';
use File::Slurp;
use POSIX qw(strftime);
use File::stat;
my $cover_db = 'cover_db/cover.json';
my $output = 'cover_html/index.
html';
# 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_info = $data->{summary}{
} 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));
};
}