In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/1cabb3b3b727154db4b25ac10caffab317ab68c3?hp=1b38d782ea1355db1729183452181e75821f69b7>
- Log ----------------------------------------------------------------- commit 1cabb3b3b727154db4b25ac10caffab317ab68c3 Author: Father Chrysostomos <[email protected]> Date: Thu Dec 8 14:53:50 2011 -0800 [perl #97476] Deparse not() following the llafr not() follows the looks-like-a-function rule, unlike its high-prece- dence counterpart. So deparsing not +($foo || die) && $baz as not ($foo || die) && $baz is incorrect, as the && $baz part is no longer part of the argu- ment to not(). ----------------------------------------------------------------------- Summary of changes: dist/B-Deparse/Deparse.pm | 2 +- dist/B-Deparse/t/deparse.t | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index b751dc5..977ce4d 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -1666,7 +1666,7 @@ sub pp_not { my $self = shift; my($op, $cx) = @_; if ($cx <= 4) { - $self->pfixop($op, $cx, $self->keyword("not")." ", 4); + $self->listop($op, $cx, "not", $op->first); } else { $self->pfixop($op, $cx, "!", 21); } diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t index b852a0c..2c3efd5 100644 --- a/dist/B-Deparse/t/deparse.t +++ b/dist/B-Deparse/t/deparse.t @@ -876,6 +876,9 @@ CORE::do({}); () = (-w $_) + 3; () = (-x $_) + 3; #### +# [perl #97476] not() *does* follow the llafr +$_ = ($a xor not +($1 || 2) ** 2); +#### # Precedence conundrums with argument-less function calls () = (eof) + 1; () = (return) + 1; -- Perl5 Master Repository
