FHEM Forum

FHEM - Entwicklung => FHEM Development => Thema gestartet von: betateilchen am 14 August 2018, 15:12:22

Titel: PERL WARNING: Unescaped left brace in regex is deprecated here ...
Beitrag von: betateilchen am 14 August 2018, 15:12:22
PERL WARNING: Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32)




perl 5.28 changes (https://metacpan.org/pod/release/XSAWYERX/perl-5.28.0-RC2/pod/perldelta.pod#Use-of-unescaped-"%7B"-immediately-after-a-"("-in-regular-expression-patterns)

Use of unescaped "{" immediately after a "(" in regular expression patterns

Using unescaped left braces is officially deprecated everywhere, but it is not enforced in contexts where their use does not interfere with expected extensions to the language. A deprecation is added in this release when the brace appears immediately after an opening parenthesis. Before this, even if the brace was part of a legal quantifier, it was not interpreted as such, but as the literal characters, unlike other quantifiers that follow a "(" which are considered errors. Now, their use will raise a deprecation message, unless turned off.




Die ersten Meldungen dazu sind schon hier im Forum aufgetaucht.
Da werden wohl einige Module angepasst werden müssen.

Titel: Antw:PERL WARNING: Unescaped left brace in regex is deprecated here ...
Beitrag von: rudolfkoenig am 17 August 2018, 21:20:29
Betrifft das auch das FHEM Framework oder meine Module?
Wenn ja, bitte ich um Beispiele, z.Zt. fehlt mir die Fantasie...
Titel: Antw:PERL WARNING: Unescaped left brace in regex is deprecated here ...
Beitrag von: betateilchen am 18 August 2018, 09:50:58
ohne das Thema bis jetzt näher innerhalb von FHEM untersucht zu haben, scheint es durchaus Module zu geben, die entsprechende perl Warnungen produzieren:

https://forum.fhem.de/index.php/topic,90253.0.html

Titel: Antw:PERL WARNING: Unescaped left brace in regex is deprecated here ...
Beitrag von: dev0 am 18 August 2018, 12:21:48
Zumindest 98_SVG verwendet regexps, die nicht maskierte { enthalten.
Ich frage mich in dem Zusammenhang gerade, ob man Eingaben von Anwendern auch darauf hin auf untersuchen sollte. Bisher machen meine Module das nicht.