# New Ticket Created by Alex Jakimenko
# Please include the string: [perl #127012]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127012 >
Code:
gather for ^3 -> $a, $b { take 1 }
Result:
===SORRY!===
Too few positionals passed; expected 2 arguments but got 1
The error message has no line number.
This snippet is from real code (although I've golfed it down), the question
was asked on #perl6: http://irclog.perlgeek.de/perl6/2015-12-24#i_11767980
Running it with --ll-exception reveals the line number.
So, that's as short as I can golf it. In fact, if you change it a little
bit, like
Code:
gather for ^1 -> $a, $b { take 1 }
Result:
Too few positionals passed; expected 2 arguments but got 1
in code at test3.pl:2
in block <unit> at test3.pl:2
Then, as you can see, the stacktrace suddenly appears. Weird.