require JSON::MaybeXS;
if($opt->{'history'}) {
$self->show_history;
}
else {
$self->cover;
}
}
sub show_history {
my $self = shift;
my $json = JSON::MaybeXS
->new(pretty => 1);
my $history_file = path('.coverhistory.json');
exit if !$history_file->exists;
my $history = $json->decode($history_file->slurp);
exit if !scalar @$history;
my $self = shift;
my $json = JSON::MaybeXS->new(pretty => 1);
local $ENV{'HARNESS_PERL_SWITCHES'} = '-MDevel::Cover';
my @cover_command = qw/cover -report json/;
my $zilla = $self->z