]> gitweb.michael.orlitzky.com - amavis-logwatch.git/commitdiff
Fix unescaped left brace warning in monster regex.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 24 Aug 2017 12:16:05 +0000 (08:16 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 24 Aug 2017 13:09:04 +0000 (09:09 -0400)
New versions of Perl are starting to complain about unescaped braces
in regular expressions, and supposedly the warning will become a fatal
error in Perl 5.30. This particular warning is,

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/^(CLEAN|SPAM(?:MY)?|INFECTED \(.*?\)|BANNED \(.*?\)
  |BAD-HEADER(?:-\d)?|UNCHECKED|MTA-BLOCKED|OVERSIZED|OTHER|TEMPFAIL)(?:
  { <-- HERE [^}]+})?, ([^[]+ )?(?:([^<]+) )?[<(](.*?)[>)] -> ([(<].*?[)>]),
  (?:.*Hits: ([-+.\d]+))(?:.* size: (\d+))?(?:.* autolearn=(\w+))?/ at
  /usr/bin/amavis-logwatch line 2286.

and it was fixed by going to line 2286 and putting a backslash before
the left brace.


No differences found