Hallo,
gelegentlich taucht in meiner Log-Datei folgende Fehlermeldung auf.
2021.07.19 07:47:30 1: PERL WARNING: Smartmatch is experimental at (eval 2172903) line 1.
2021.07.19 07:47:30 3: eval: my $EVENT= $evalSpecials->{'%EVENT'};my $EVTPART0= $evalSpecials->{'%EVTPART0'};my $NAME= $evalSpecials->{'%NAME'};my $SELF= $evalSpecials->{'%SELF'};my $TYPE= $evalSpecials->{'%TYPE'};{ if( ($EVENT ~~ / /) and ($EVENT !~ /: /) ) {fhem("setreading $NAME $EVENT")} }
2021.07.19 07:47:30 1: stacktrace:
2021.07.19 07:47:30 1: main::__ANON__ called by (eval 2172903) (1)
2021.07.19 07:47:30 1: (eval) called by fhem.pl (1161)
2021.07.19 07:47:30 1: main::AnalyzePerlCommand called by fhem.pl (1190)
2021.07.19 07:47:30 1: main::AnalyzeCommand called by fhem.pl (1117)
2021.07.19 07:47:30 1: main::AnalyzeCommandChain called by ./FHEM/91_notify.pm (121)
2021.07.19 07:47:30 1: main::notify_Exec called by fhem.pl (3893)
2021.07.19 07:47:30 1: main::CallFn called by fhem.pl (3810)
2021.07.19 07:47:30 1: main::DoTrigger called by fhem.pl (4895)
2021.07.19 07:47:30 1: main::readingsEndUpdate called by fhem.pl (5078)
2021.07.19 07:47:30 1: main::readingsSingleUpdate called by ./FHEM/98_dummy.pm (73)
2021.07.19 07:47:30 1: main::dummy_Set called by fhem.pl (3888)
2021.07.19 07:47:30 1: main::CallFn called by fhem.pl (1938)
2021.07.19 07:47:30 1: main::DoSet called by fhem.pl (1971)
2021.07.19 07:47:30 1: main::CommandSet called by fhem.pl (1266)
2021.07.19 07:47:30 1: main::AnalyzeCommand called by fhem.pl (1117)
2021.07.19 07:47:30 1: main::AnalyzeCommandChain called by ./FHEM/01_FHEMWEB.pm (2775)
2021.07.19 07:47:30 1: main::FW_fC called by ./FHEM/01_FHEMWEB.pm (963)
2021.07.19 07:47:30 1: main::FW_answerCall called by ./FHEM/01_FHEMWEB.pm (598)
2021.07.19 07:47:30 1: main::FW_Read called by fhem.pl (3893)
2021.07.19 07:47:30 1: main::CallFn called by fhem.pl (774)
Was hat es damit auf sich? Ist da Code in fhem.pl nicht PERL-Standardkonform? Wie kann man das beheben?
Gruß
Dieter
a) WARNING != Fehler...
b) Die tiefere Ursache ist Code, den du selbst als <command> in einem notify stehen hast:
{ if( ($EVENT ~~ / /) and ($EVENT !~ /: /) ) {fhem("setreading $NAME $EVENT")} }
Sollte sich durch "configdb search" bzw. eine Textsuche in der fhem.cfg aufdecken lassen, welches notify das ist ;) .
(Der Sinn dieses notify erschließt sich mir nicht so recht, sieht nach einem Test aus).
c) Obwohl kein Fehler, ist es sinnvoll, "smartmatch" zu vermeiden, das scheint sich nicht durchgesetzt zu haben.
Danke; ich werde mich auf die Suche begeben.