Skip Menu |
Report information
Id: 128120
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

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



Subject: [LTA] error message when using triple colon in variable names (my $foo:::_)
Download (untitled) / with headers
text/plain 409b
… Wait, you can use colons in variable names?… Anyway: Code: my $foo:::_ = 42; say $foo_:::_ Result: ===SORRY!=== Error while compiling -e Variable '$foo_:_' is not declared. Did you mean '$foo:::_'? at -e:1 ------> my $foo:::_ = 42; say ⏏$foo_:::_ Well, yes, I meant '$foo:::_'. In fact, that's exactly what I wrote. Related discussion about colons here: https://github.com/perl6/specs/issues/106
Download (untitled) / with headers
text/plain 447b
First, the code in OP has a typo. The variable names are the same, but the error is wrong. But to add to the discussion on colons. It seems it's an artifact from allowing the namespace double-colons, and they should not be permitted for use the same as hyphens or apostrophes. There's a whole bunch of abuse examples in this log: http://irclog.perlgeek.de/perl6/2016-05-11#i_12461836 Especially note that my $x:foo works, but my \x:foo doesn't.
Download (untitled) / with headers
text/plain 379b
Because I screwed up the example in the bug report, here is a proper one: Code: my $foo_:::_ = 42; say $foo_:::_ Result: ===SORRY!=== Error while compiling -e Variable '$foo_:_' is not declared. Did you mean '$foo_:::_'? at -e:1 ------> my $foo_:::_ = 42; say ⏏$foo_:::_ However, let's add more wtfness to this bug report: Code: my $foo_:_ = 42; say $foo_:::_ Result: 42
To: perl6-compiler [...] perl.org
From: Parrot Raiser <1parrota [...] gmail.com>
Subject: Re: [perl #128120] [LTA] error message when using triple colon in variable names (my $foo:::_)
Date: Wed, 11 May 2016 09:40:36 -0400
Download (untitled) / with headers
text/plain 839b
The appropriate error message for this would be "Really stupid variable name! Don't do things like that". On 5/10/16, Alex Jakimenko <perl6-bugs-followup@perl.org> wrote: Show quoted text
> # New Ticket Created by Alex Jakimenko > # Please include the string: [perl #128120] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=128120 > > > > … Wait, you can use colons in variable names?… Anyway: > > Code: > my $foo:::_ = 42; say $foo_:::_ > > Result: > ===SORRY!=== Error while compiling -e > Variable '$foo_:_' is not declared. Did you mean '$foo:::_'? > at -e:1 > ------> my $foo:::_ = 42; say ⏏$foo_:::_ > > > Well, yes, I meant '$foo:::_'. In fact, that's exactly what I wrote. > > > Related discussion about colons here: > https://github.com/perl6/specs/issues/106 >


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

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