Илья (>):
> (23:24:28) ihrd: question about .kv
> (23:24:39) ihrd: rakudo: my @a = {a => 1}, {b =>2}; my %h = foo => @a;
> say %h.kv.perl;
> (23:24:41) p6eval: rakudo 33880: OUTPUT[["foo", {"a" => 1}, {"b" => 2}]␤]
> (23:24:59) ihrd: rakudo: say ({ foo => [{a=>1}, {b=>1}]}).perl;
> (23:25:02) p6eval: rakudo 33880: OUTPUT[{"foo" => [{"a" => 1}, {"b" => 1}]}␤]
> (23:25:22) ihrd: I feel result should be the same

Based on S03, I think so too.

 <http://perlcabal.org/syn/S03.html#line_1423>

] Binary => is no longer just a "fancy comma". It now constructs
] a Pair object that can, among other things, be used to pass
] named arguments to functions. It provides item context to both
] sides.

Maybe submit a rakudobug about this?

// Carl
  • .kv Илья
    • Re: .kv Carl Mäsak
    • Re: .kv Patrick R. Michaud

Reply via email to