develooper Front page | perl.perl5.porters | Postings from June 2018

Re: [perl #132141] lvalue return broken in signature

Thread Previous
From:
Dave Mitchell
Date:
June 5, 2018 14:20
Subject:
Re: [perl #132141] lvalue return broken in signature
Message ID:
20180605142027.GG26559@iabyn.com
On Thu, Sep 21, 2017 at 01:38:17PM -0700, Zefram wrote:
> Mixing signatures with lvalue subs:
> 
> $ perl5.26.0 -Mexperimental=signatures -lwe 'our @a = qw(wibble wobble wabble); sub foo ($i = return substr($a[0], -1, 1)) :lvalue { return substr($a[$i], 1, 1); } print "@a"; foo(2) = "u"; print "@a"; foo() = "y"; print "@a"'
> wibble wobble wabble
> wibble wobble wubble
> Can't return a temporary from lvalue subroutine at -e line 1.

Fixed in 5.27.8. Resolving.

-- 
The Enterprise successfully ferries an alien VIP from one place to another
without serious incident.
    -- Things That Never Happen in "Star Trek" #7

Thread Previous


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