Since 570fa43328, we emit precedence warnings if the LHS of a comparison or binding op starts with an unparenthesized logical negation (!, as in !$x == $y). Explicit parens can be used to avoid the warning ((!$x) == $y).
Teach B::Deparse to keep these parentheses even if they're not strictly required by operator precedence because we don't want the deparsed code to generate more warnings than the original code.
Fixes #22661.
This set of changes requires a perldelta entry, and it is included.
Since 570fa43328, we emit precedence warnings if the LHS of a comparison or binding op starts with an unparenthesized logical negation (
!
, as in!$x == $y
). Explicit parens can be used to avoid the warning ((!$x) == $y
).Teach B::Deparse to keep these parentheses even if they're not strictly required by operator precedence because we don't want the deparsed code to generate more warnings than the original code.
Fixes #22661.