> On 13 Dec 2015, at 05:18, Zefram (via RT) <perl6-bugs-follo...@perl.org> > wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #126890] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=126890 > > > > $ perl6 -e '((Nil)=>1).key.WHAT.say; ((Nil)=>1).perl.EVAL.key.WHAT.say' > Nil > (Str) > > The problem is that the .perl of that pair is "Nil => 1", which parses > as a string key rather than the Nil object. Parens or some other > circumlocution is required in order to preserve the meaning of "Nil" > in this context.
I think this is ENOTABUG. Perl 6 has the same auto-quoting rules for the left side of a fat comma as Perl 5. $ 6 'dd (Any => 42).key' Str $var = “Any" $ 6 'dd ((Any) => 42).key' Any $var = Any So, yes, you need to do something extra to keep the typedness of the left hand side. Just as you would need to do in Perl 5. Another way of creating a Pair, is Pair.new: $ 6 'dd Pair.new(Any,42).key' Any $var = Any YMMV Liz