[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() =

Re: [perl #126172] maybe a bug

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

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 =

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

[perl #126183] Calling a sub that uses a subsignature leaks memory

2015-09-25 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #126183] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126183 > See subject and the attached script. To run the attached test script, you'll need to build

Misunderstanding when usng elems on undefined Array

2015-09-25 Thread mt1957
Found the following using Array; > my Array $a; > say $a.elems; 1 > $a.push(1) [1] > say $a.perl [1] > say $a.elems 1 > my Array $a .= new; [] > say $a.elems; 0 Seems that an uninitialized Array reports one element but pushing values on the array will define the properly. In this case it is i

[perl #126184] [BUG] Error in supply block reported at call context instead of definition

2015-09-25 Thread via RT
# New Ticket Created by Justin DeVuyst # Please include the string: [perl #126184] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126184 > [jdv@wieldy ~]$ cat -n test.p6 1 use v6; 2 3 my $supply = supply {

[perl6/specs] 82b803: Spec fix for #126172

2015-09-25 Thread GitHub
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: 82b80326bad36f4ca0d33d4b8064061f155a21c5 https://github.com/perl6/specs/commit/82b80326bad36f4ca0d33d4b8064061f155a21c5 Author: Elizabeth Mattijsen Date: 2015-09-25 (Fri, 25 Sep 2015) Changed paths:

[perl #126189] [BUG] [LEAK] loop { 0, .1 ... 1000 }

2015-09-25 Thread via RT
# New Ticket Created by Larry Wall # Please include the string: [perl #126189] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126189 > Leaks memory, probably due to the implicit function being called to produce the next value.

require on string stopped working in rakudo 2015.09

2015-09-25 Thread Gabor Szabo
Hi, I am really glad Rakudo finally came out. I've installed in and tried to run the tests of Perl6::Maven. They quickly failed as I have been using 'require' on string to check if all the module compile properly. The following code now fails: use v6; my $name = 'Bailador'; require $name; eve

Should the use of eval recommend EVAL?

2015-09-25 Thread Gabor Szabo
Hi, I just tried to use eval "say 19+23"; but I got: ===SORRY!=== Error while compiling a.pl Undeclared routine: eval used at line 3. Did you mean 'val'? Would it be possible to recommend 'EVAL' as well ? Gabor

How to push a hash on an array without flattening it to Pairs?

2015-09-25 Thread Gabor Szabo
In the first two cases the hash was converted to Pairs before assigning to the array. Only the third case gave what I hoped for. How can I push a hash onto an array as a single entity? use v6; my %h = x => 6, y => 7; say %h.perl; # {:x(6), :y(7)} my @a = %h; say @a.elems; # say @a[0];