CGI-Lingua
view release on metacpan or search on metacpan
scripts/generate_index.pl view on Meta::CPAN
$class,
$total_info->{statement}{percentage} // 0,
$total_info->{branch}{percentage} // 0,
$total_info->{condition}{percentage} // 0,
$total_info->{subroutine}{percentage} // 0,
$total_pct
);
}
my $timestamp = 'Unknown';
if (my $stat = stat($cover_db)) {
$timestamp = strftime('%Y-%m-%d %H:%M:%S', localtime($stat->mtime));
}
Readonly my $commit_url => "https://github.com/nigelhorne/CGI-Lingua/commit/$commit_sha";
my $short_sha = substr($commit_sha, 0, 7);
push @html, '</tbody></table>';
# Parse historical snapshots
my @history_files = bsd_glob("coverage_history/*.json");
scripts/generate_index.pl view on Meta::CPAN
foreach my $file (reverse sort @history_files) {
last if $processed_count >= $max_points;
my $json = eval { decode_json(read_file($file)) };
next unless $json && $json->{summary}{Total};
my ($sha) = $file =~ /-(\w{7})\.json$/;
next unless $commit_messages{$sha}; # Skip merge commits
my $timestamp = $commit_times{$sha} // strftime('%Y-%m-%dT%H:%M:%S', localtime((stat($file))->mtime));
$timestamp =~ s/ /T/;
$timestamp =~ s/\s+([+-]\d{2}):?(\d{2})$/$1:$2/; # Fix space before timezone
$timestamp =~ s/ //g; # Remove any remaining spaces
my $pct = $json->{summary}{Total}{total}{percentage} // 0;
my $color = 'gray'; # Will be set properly after sorting
my $url = "https://github.com/nigelhorne/CGI-Lingua/commit/$sha";
my $comment = $commit_messages{$sha};
# Store with timestamp for sorting
( run in 1.976 second using v1.01-cache-2.11-cpan-39bf76dae61 )