fix: failed then Readonly is missing

This commit is contained in:
2023-02-05 09:20:20 +01:00
parent a3fa194cdd
commit 5f611555e3
2 changed files with 12 additions and 5 deletions

View File

@ -32,9 +32,18 @@ package FHEM::Core::Weather;
use strict;
use warnings;
use Time::HiRes qw(gettimeofday);
my $missingModul = 'apt install';
eval { use Time::HiRes qw /gettimeofday/; 1 }
or $missingModul .= "libtime-hires-perl ";
eval { use Readonly; 1 }
or $missingModul .= "libreadonly-perl ";
#use Time::HiRes qw(gettimeofday);
use experimental qw /switch/;
use Readonly;
#use Readonly;
use FHEM::Meta;
@ -318,8 +327,6 @@ sub _ReturnWithError {
}
sub DeleteForecastreadings {
return 0 unless ( __PACKAGE__ eq caller(0) );
my $hash = shift;
my $name = $hash->{NAME};