FHEM Forum

FHEM => Frontends => SVG / Plots / logProxy => Thema gestartet von: gandy am 07 Dezember 2016, 19:04:15

Titel: [patch] 98_logProxy.pm: PERL WARNING
Beitrag von: gandy am 07 Dezember 2016, 19:04:15
Hallo Andre,

beim Laden des Moduls 98_logProxy.pm (Perl v5.24.1) erhalte ich folgende Warnung:

2016.12.07 18:40:35.051 1: PERL WARNING: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/={ <-- HERE / at /opt/fhem/FHEM/98_logProxy.pm line 802, <$fh> line 2626.
2016.12.07 18:40:35.051 1: stacktrace:
2016.12.07 18:40:35.053 1:     main::__ANON__                      called by /opt/fhem/FHEM/98_logProxy.pm (802)
2016.12.07 18:40:35.054 1:     (eval)                              called by fhem.pl (2321)
2016.12.07 18:40:35.055 1:     (eval)                              called by fhem.pl (2320)
2016.12.07 18:40:35.055 1:     main::CommandReload                 called by fhem.pl (1744)
2016.12.07 18:40:35.056 1:     main::LoadModule                    called by fhem.pl (1806)
2016.12.07 18:40:35.057 1:     main::CommandDefine                 called by fhem.pl (1104)
2016.12.07 18:40:35.057 1:     main::AnalyzeCommand                called by fhem.pl (974)
2016.12.07 18:40:35.058 1:     main::AnalyzeCommandChain           called by fhem.pl (1238)
2016.12.07 18:40:35.058 1:     main::CommandInclude                called by fhem.pl (519)


Beheben läßt sich das durch folgende kleine Änderung:

Index: 98_logProxy.pm
===================================================================
--- 98_logProxy.pm      (Revision 12722)
+++ 98_logProxy.pm      (Arbeitskopie)
@@ -799,7 +799,7 @@

       while (@options) {
         my $option = shift(@options);
-        while ($option && $option =~ m/={/ && $option !~ m/>}/ ) {
+        while ($option && $option =~ m/=\{/ && $option !~ m/>\}/ ) {
           my $next = shift(@options);
           last if( !defined($next) );
           $option .= ",". $next;


Allerdings bin ich mir nicht sicher, ob danach die Optionen noch richtig ausgewertet werden.

Grüße,
Andy.
Titel: Antw:[patch] 98_logProxy.pm: PERL WARNING
Beitrag von: justme1968 am 07 Dezember 2016, 19:20:31
ich hab mal die änderung für die linke klammer eingecheckt. schau mal ob das schon reicht.

welche perl version hast du?

gruss
  andre
Titel: Antw:[patch] 98_logProxy.pm: PERL WARNING
Beitrag von: gandy am 07 Dezember 2016, 19:36:39
Stimmt, die linke Klammer reicht. Mein Perl ist v5.24.1 (Debian Wheezy auf einem CubieTruck).

Mein Testsystem läuft mit Perl v5.22.1 (Ubuntu 16.04.1), dort sehe ich die Meldung nicht.

Grüße,
Andy.