2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 19:04:20 +00:00

98_JsonMod.pm: #109413: no warnings/ minor performance improvement

git-svn-id: https://svn.fhem.de/fhem/trunk@21502 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
herrmannj 2020-03-24 20:02:32 +00:00
parent 059379cde7
commit afb4f112b0

View File

@ -276,7 +276,9 @@ sub JsonMod_DoReadings {
};
my sub jsonPathf {
eval 'no warnings qw( redundant missing )' if ($] >= 5.22);
# https://forum.fhem.de/index.php/topic,109413.msg1034685.html#msg1034685
no if $] >= 5.022, q|warnings|, qw( redundant missing );
#eval 'no warnings qw( redundant missing )' if ($] >= 5.22);
my ($jsonPathExpression, $format) = @_;
$format //= '%s';
my $value = $path->get($jsonPathExpression)->getResultValue();
@ -555,7 +557,9 @@ sub JsonMod_ApiResponse {
sub JsonMod_Logger {
my ($hash, $verbose, $message, @args) = @_;
my $name = $hash->{'NAME'};
eval 'no warnings qw( redundant missing )' if ($] >= 5.22);
# https://forum.fhem.de/index.php/topic,109413.msg1034685.html#msg1034685
no if $] >= 5.022, q|warnings|, qw( redundant missing );
#eval 'no warnings qw( redundant missing )' if ($] >= 5.22);
Log3 ($name, $verbose, sprintf('[%s] '.$message, $name, @args));
return;
};