develooper Front page | perl.perl6.compiler | Postings from July 2010

[perl #69176] [BUG] Less than helpful error message when writing %*foo instead of *%foo in parameter list in Rakudo

From:
Will Coleda via RT
Date:
July 28, 2010 07:44
Subject:
[perl #69176] [BUG] Less than helpful error message when writing %*foo instead of *%foo in parameter list in Rakudo
Message ID:
rt-3.6.HEAD-11314-1280328266-1768.69176-15-0@perl.org
On Wed Sep 16 14:47:06 2009, masak wrote:
> $ perl6 -e 'class A { method foo(%*opts) {} }'
> Invalid twigil used in signature parameter. at line 1, near ") {} }"
> 
> Suggest making the error message include "did you mean '*%opts'?".

This doesn't error now:

$ ./perl6 -e 'class A { method foo(%*opts) {} }'
$

the * twigil refers to a dynamically overridable global variable. Not 
sure if this makes sense in a signature, though.

-- 
Will "Coke" Coleda



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About