Merge pull request 'fix: missing perl modules' (#50) from patch-removePrivatFnDeklaration into dev
Reviewed-on: #50
This commit is contained in:
commit
38091aacd1
@ -1,5 +1,5 @@
|
|||||||
UPD 2023-01-29_16:14:48 25809 FHEM/59_Weather.pm
|
UPD 2023-01-29_16:14:48 25809 FHEM/59_Weather.pm
|
||||||
UPD 2023-02-05_09:19:03 34095 lib/FHEM/Core/Weather.pm
|
UPD 2023-02-05_09:25:24 34254 lib/FHEM/Core/Weather.pm
|
||||||
UPD 2023-01-29_16:14:48 50106 lib/FHEM/APIs/Weather/DarkSkyAPI.pm
|
UPD 2023-01-29_16:14:48 50106 lib/FHEM/APIs/Weather/DarkSkyAPI.pm
|
||||||
UPD 2023-01-29_16:14:48 33422 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
|
UPD 2023-01-29_16:14:48 33422 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
|
||||||
UPD 2023-01-29_16:14:48 36101 lib/FHEM/APIs/Weather/wundergroundAPI.pm
|
UPD 2023-01-29_16:14:48 36101 lib/FHEM/APIs/Weather/wundergroundAPI.pm
|
||||||
|
@ -32,7 +32,7 @@ package FHEM::Core::Weather;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my $missingModul = 'apt install';
|
my $missingModul = '';
|
||||||
|
|
||||||
eval { use Time::HiRes qw /gettimeofday/; 1 }
|
eval { use Time::HiRes qw /gettimeofday/; 1 }
|
||||||
or $missingModul .= "libtime-hires-perl ";
|
or $missingModul .= "libtime-hires-perl ";
|
||||||
@ -777,6 +777,12 @@ sub Define {
|
|||||||
return $@ unless ( FHEM::Meta::SetInternals($hash) );
|
return $@ unless ( FHEM::Meta::SetInternals($hash) );
|
||||||
use version 0.60; our $VERSION = FHEM::Meta::Get( $hash, 'version' );
|
use version 0.60; our $VERSION = FHEM::Meta::Get( $hash, 'version' );
|
||||||
|
|
||||||
|
return
|
||||||
|
'Cannot define Weather device. Please use "apt install '
|
||||||
|
. ${missingModul}
|
||||||
|
. ' to install missing perl modules'
|
||||||
|
if ($missingModul);
|
||||||
|
|
||||||
my $usage =
|
my $usage =
|
||||||
"syntax: define <name> Weather [API=<API>] [apikey=<apikey>] [location=<location>] [interval=<interval>] [lang=<lang>]";
|
"syntax: define <name> Weather [API=<API>] [apikey=<apikey>] [location=<location>] [interval=<interval>] [lang=<lang>]";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user