mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 01:14:19 +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:
parent
059379cde7
commit
afb4f112b0
@ -276,7 +276,9 @@ sub JsonMod_DoReadings {
|
|||||||
};
|
};
|
||||||
|
|
||||||
my sub jsonPathf {
|
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) = @_;
|
my ($jsonPathExpression, $format) = @_;
|
||||||
$format //= '%s';
|
$format //= '%s';
|
||||||
my $value = $path->get($jsonPathExpression)->getResultValue();
|
my $value = $path->get($jsonPathExpression)->getResultValue();
|
||||||
@ -555,7 +557,9 @@ sub JsonMod_ApiResponse {
|
|||||||
sub JsonMod_Logger {
|
sub JsonMod_Logger {
|
||||||
my ($hash, $verbose, $message, @args) = @_;
|
my ($hash, $verbose, $message, @args) = @_;
|
||||||
my $name = $hash->{'NAME'};
|
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));
|
Log3 ($name, $verbose, sprintf('[%s] '.$message, $name, @args));
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user