:Spec;
use JSON::MaybeXS qw( encode_json );
our $VERSION = 'v0.41.0'; # VERSION
sub report {
shift;
my $db = shift;
my $options = shift;
my $json = _get_codecov_json( $options-
::Spec->catfile( $options->{outputdir}, 'codecov.json' );
open my $fh, '>', $file
or die "Cannot write to $file: $!";
print {$fh} $json
or die "Cannot write to $file: $!";
e to $file: $!";
}
sub _get_codecov_json {
my ( $files, $db ) = @_;
my %coverages = map { _get_file_coverage( $_, $db ) } @$files;
return encode_json( { coverage => \%coverages, messages