On Sat Jun 16 18:49:49 2012, sprout wrote: > I noticed through experimentation that loop exits (last, next) have low > precedence. What I didn’t realise is that they have their own > precedence level, unlisted in perlop: > > diff --git a/pod/perlop.pod b/pod/perlop.pod > index 3edeabd..c9a1adf 100644 > --- a/pod/perlop.pod > +++ b/pod/perlop.pod > @@ -49,6 +49,7 @@ values only, not array values. > nonassoc .. ... > right ?: > right = += -= *= etc. > + nonassoc loop exits (last, next, goto) > left , => > nonassoc list operators (rightward) > right not > > That could be considered a bug in perl. In any case, I’d just muddied > things a bit by trying to fix Deparse without realising what perl was > actually doing. > > Changing the precedence of goto might break it, as it takes an arbitrary > expression. Other ‘loopexes’ are simply buggy when it comes to > arbitrary expressions, treating anything that is not a simple constant > as the empty label "". But I think they should match goto (not only in > precedence, but in allowing computed labels). Can we try to decide how this should work? Should goto’s real precedence be listed in perlop.pod? Or should we fix its precedence? If the latter, which precedence shall it have? -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=113684Thread Previous | Thread Next