Skip to content

Commit

Permalink
Fix uninitialized value warning: cover -write`
Browse files Browse the repository at this point in the history
Introduced by ea35cf0
  • Loading branch information
jsoref committed Dec 8, 2024
1 parent 7a718d7 commit 841c125
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/cover
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ sub main {
my @argv = @ARGV;
my $options = dclone($Options);
my $report = $Options->{report}[0];
my $format = "Devel::Cover::Report::\u$report";
$format->get_options($options) if $format->can("get_options");
if ($report) {
my $format = "Devel::Cover::Report::\u$report";
$format->get_options($options) if $format->can("get_options");
}
my $dbname = File::Spec->rel2abs(@ARGV ? shift @ARGV : "cover_db");
die "Can't open database $dbname\n"
if !$Options->{delete} && !$Options->{test} && !-d $dbname;
Expand Down

0 comments on commit 841c125

Please sign in to comment.