From 841c12518ee3c7cc4c80433af71ca7c5f5eaabe1 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 15 Jul 2024 01:37:06 -0400 Subject: [PATCH] Fix uninitialized value warning: `cover -write`` Introduced by ea35cf06f52f25e0c681ae488b8fa6d498f9d48f --- bin/cover | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/cover b/bin/cover index 78e560b4..fd66ce2f 100755 --- a/bin/cover +++ b/bin/cover @@ -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;