Re: [perl #126176] subroutine with trait rw "return" a scalar cann't be lvalue

2015-09-25 Thread Timo Paulssen
Liz, you're not quite correct about this I'm afraid. check this out: timo@schmand ~> perl6 -e 'my $lastval = 4; sub lastval is rw { $lastval }; dd $lastval; lastval() = 5; dd $lastval' Int $lastval = 4 Int $lastval = 5 The problem was that "return" was used. If you use "return-rw" or

Re: [perl #126176] subroutine with trait rw "return" a scalar cann't be lvalue

2015-09-25 Thread Elizabeth Mattijsen
> On 25 Sep 2015, at 12:05, 宋文泰 (via RT) wrote: > > # New Ticket Created by 宋文泰 > # Please include the string: [perl #126176] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=126176 > > > > ``` perl6 code > my $lastval =

[perl #126176] subroutine with trait rw "return" a scalar cann't be lvalue

2015-09-25 Thread via RT
# New Ticket Created by 宋文泰 # Please include the string: [perl #126176] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126176 > ``` perl6 code my $lastval = 4; sub lastval () is rw { return $lastval } dd $lastval; lastval() =