I think this is not a bug but the result of angle brackets quoting, which 
creates allomorphs:.  It is even documented:

https://docs.perl6.org/language/glossary#index-entry-Allomorph

Hope this helps.

> On 27 Nov 2016, at 00:47, brian d foy (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  "brian d foy" 
> # Please include the string:  [perl #130184]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=130184 >
> 
> 
> Adapted from the Stackoverflow answer at:
> http://stackoverflow.com/a/40824226/2766176
> 
> I'm using moar (2016.10) on macosx (10.10.5) darwin (14.5.0) (These
> variables are quite nice!)
> 
> This came out of a problem I had with set membership. It turns out
> that the way you make the set matters, and the way you make the
> candidate member matters. In my case, there's a bug with angle-bracket
> word quoting.
> 
> I used the [angle-brackets form of the quote
> words](https://docs.perl6.org/language/quoting#Word_quoting:_qw). The
> quote words form is supposed to be equivalent to the quoting version
> (that is, True under `eqv`). Here's the doc example:
> 
>    <a b c> eqv ('a', 'b', 'c')
> 
> But, when I try this with a word that is all digits, this is not equivalent:
> 
> $ perl6
>> < a b 137 > eqv ( 'a', 'b', '137' )
> False
> 
> But, the other forms of word quoting are!
> 
>> qw/ a b 137 / eqv ( 'a', 'b', '137' )
> True
>> Q:w/ a b 137 / eqv ( 'a', 'b', '137' )
> True
> 
> The angle-bracket word quoting uses
> [IntStr](https://docs.perl6.org/type/IntStr):
> 
>> my @n = < a b 137 >
> [a b 137]
>> @n.perl
> ["a", "b", IntStr.new(137, "137")]
> 
> Without the word quoting, the digits word comes out as [Str]:
> 
>> ( 'a', 'b', '137' ).perl
> ("a", "b", "137")
>> ( 'a', 'b', '137' )[*-1].perl
> "137"
>> ( 'a', 'b', '137' )[*-1].WHAT
> (Str)
>> my @n = ( 'a', 'b', '137' );
> [a b 137]
>> @n[*-1].WHAT
> (Str)

Reply via email to