perl5
perl5 copied to clipboard
B::Deparse: retain () around ! if omitting them would warn
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.