You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2024/03/11 23:12:59 UTC

[Bug 8228] New: Stricter syntax warning in Perl 5.39

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8228

            Bug ID: 8228
           Summary: Stricter syntax warning in Perl 5.39
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Building & Packaging
          Assignee: dev@spamassassin.apache.org
          Reporter: sidney@sidney.com
  Target Milestone: Undefined

Perl 5.39 has a new stricter check for code that may be misleading due to
obscure precedence of operators. See
https://perldoc.perl.org/blead/perl5396delta
and the errors in spamassassin.raw line 293
https://www.cpantesters.org/cpan/report/017fa1c0-dff2-11ee-8d78-4d126e8775ea

This just needs to be parenthesized to eliminate the warning.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8228] Stricter syntax warning in Perl 5.39

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8228

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |4.0.1
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Sidney Markowitz <si...@sidney.com> ---
% svn ci -m "8228 fix operator precedence error caught by perl 5.39 warning"
spamassassin.raw 
Sending        spamassassin.raw
Transmitting file data .done
Committing transaction...
Committed revision 1916242.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8228] Stricter syntax warning in Perl 5.39

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8228

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sidney@sidney.com

--- Comment #1 from Sidney Markowitz <si...@sidney.com> ---
Actually, now that I'm reading it over, it looks like the warning has found a
longstanding bug. The documentation I linked to uses as an example exactly what
is being warned here. It says

exit $x ? 0 : 1;  # actually parses as: exit($x) ? 0 : 1;

spamassassin.raw line 293 is

exit $res ? 1 : 0;

We intend exit($res ? 1 : 0);
not exit($res) ? 1 : 0;

right?

-- 
You are receiving this mail because:
You are the assignee for the bug.