make $@ local, so we don't print "Can't locate Undefined subroutine &Devel::Cover::get_coverage called" in other parts where we evaluate $@

main
parent 79ae6f03fd
commit 1b0f7f1138
Signed by untrusted user: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -102,7 +102,13 @@ my @devfiles = (
# 3 -> debug output
my $verbosity_level = 1;
my $is_covering = !!(eval { Devel::Cover::get_coverage() });
my $is_covering = 0;
{
# make $@ local, so we don't print "Undefined subroutine called"
# in other parts where we evaluate $@
local $@ = '';
$is_covering = !!(eval { Devel::Cover::get_coverage() });
}
# the reason why Perl::Critic warns about this is, that it suspects that the
# programmer wants to implement a test whether the terminal is interactive or

Loading…
Cancel
Save