make $@ local, so we don't print "Can't locate Undefined subroutine &Devel::Cover::get_coverage called" in other parts where we evaluate $@
This commit is contained in:
parent
79ae6f03fd
commit
1b0f7f1138
1 changed files with 7 additions and 1 deletions
|
@ -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…
Reference in a new issue