develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #113684] Bleadperl v5.17.0-326-g6a31dbf breaks PJCJ/Devel-Cover-0.89.tar.gz

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
July 13, 2012 20:16
Subject:
[perl #113684] Bleadperl v5.17.0-326-g6a31dbf breaks PJCJ/Devel-Cover-0.89.tar.gz
Message ID:
rt-3.6.HEAD-11172-1342235806-780.113684-15-0@perl.org
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=113684

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About