[perl #130092] LTA error message when misspelling “method” (meathod bar($test))

2016-11-13 Thread via RT
# New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
# Please include the string:  [perl #130092]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130092 >


*Code:*
class Foo {
meathod bar($name) {}
}

*Result:*
===SORRY!=== Error while compiling -e
Variable '$name' is not declared
at -e:2
--> meathod bar(⏏$name) {}


The error message is not wrong, but we have at least one case where
somebody was struggling to find the actual issue. Perhaps it can be smart
enough to figure it out.

See also IRC log: https://irclog.perlgeek.de/perl6/2016-11-14#i_13561822


[perl #128341] [JVM] RuntimeException when calling .perl on multidimensional array with some elements autovivified

2016-11-13 Thread Christian Bartolomaeus via RT
Fixed with https://github.com/rakudo/rakudo/commit/13f6b63455

I'm closing this ticket as 'resolved'.


[perl #130086] [BUG] multiple eof-s support on $*IN

2016-11-13 Thread via RT
# New Ticket Created by  vividsnow 
# Please include the string:  [perl #130086]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130086 >


Hello

It is expected to be able to pass multiple eof-s (by pressing Ctrl+D).

working p5 script: multiple-eof.pl
and two variants of p6 scripts, which falls to endless loop after first "eof".

Rakudo version 2016.10 built on MoarVM version 2016.10 implementing Perl 6.c.

use strict;
while () {
while (<>) { print }
print "got eof\n" if eof;
}
loop {
if $*IN.eof {
say 'try reopen';
$*IN = open($*IN.path, :r);
}
my $s = $*IN.Supply;
react {
whenever $s -> $buf {
print $buf;
LAST {
say 'got eof';
}
}
}
}
loop {
for $*IN.lines -> $line { say $line };
say 'got eof' if $*IN.eof;
}


[perl #130083] [BUG] a grammar doesn't match when using perl6-debug-m and does when using perl6-m

2016-11-13 Thread via RT
# New Ticket Created by  Daniel Green 
# Please include the string:  [perl #130083]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130083 >


perl6-debug-m -e 'grammar G { regex TOP {^^ "#" \s* "line" \s+
$=(\d+) \s* [ \s (<[,:]>?) $=(<-[,:]>+) $0 ]? \s* $$} };
say G.parse("#line 2 ,foo.bar,")'
Nil

It matched up through the 'foo.bar', but then backs off back to the space
and gives Nil.

perl6-m -e 'grammar G { regex TOP {^^ "#" \s* "line" \s+ $=(\d+) \s*
[ \s (<[,:]>?) $=(<-[,:]>+) $0 ]? \s* $$} }; say G.parse("#line 2
,foo.bar,")'
「#line 2 foo.bar」
 line => 「2」
 0 => 「」
 filename => 「foo.bar」


However, simpler example works in both.

perl6-debug-m -e 'grammar G { regex TOP {^^ "#" \s* "line" \s+
$=(\d+) $$} }; say G.parse("#line 2")'
「#line 2」
 0 => 「2」
 line => 「2」

perl6-m -e 'grammar G { regex TOP {^^ "#" \s* "line" \s+ $=(\d+) $$}
}; say G.parse("#line 2")'
「#line 2」
 0 => 「2」
 line => 「2」


perl6 --version
This is Rakudo version 2016.10-144-ga1347ca built on MoarVM version
2016.10-35-gec45ae2