Skip Menu |
Report information
Id: 131640
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Subject: Unterminated qw subscript should say the line number where it was started ( say “$<x” )
Download (untitled) / with headers
text/plain 1.1k
Let's say you have this code: my $x; say “$x<”; my %h = <a 1 b 2>; for %h.kv -> $k, $v { say “$k $v” } The error message you will get: ===SORRY!=== Error while compiling -e Variable '$k' is not declared at -e:6 ------> for %h.kv -> ⏏$k, $v { In a way, this is understandable. I don't know if it is possible to print something better in this case. However, let's say you realize what is happening. The issue, obviously, is somewhere above the line where you are getting in the error message. In theory, if you delete everything on that line and onwards, the error message would complain about unclosed something, and this will lead the developer to the line which causes the problem. So let's try it. Code: my $x; say “$x<”; my %h = <a 1 b 2>; Result: Unable to parse quote-words subscript; couldn't find right angle quote at -e:6 ------> <BOL>⏏<EOL> expecting any of: postfix It says “couldn't find right angle quote” but does not say where the left angle quote was. It should say “couldn't find right angle quote (corresponding left angle quote was at line X)”. We already have this kind of thing for other unclosed things (e.g. #`{{{ )

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at