A few general pointers for Perl programmers starting out to write tests using Perl6. This describes a few of the differences in handling arrays vs. hashes, comparing objects, flattening, and value vs. immutable object contents.
12. Not quite zero:
t/Perl6.t .. Cannot convert string to number:
base-10 number must begin with valid digits or
'.' in 'âasdf' (indicated by â)
in block <unit> at t/Perl6.t line 7
Actually thrown at:
in block <unit> at t/Perl6.t line 7
23. Viewing contents
> %a = ( 'a' .. 'e' );
Odd number of elements found where hash
initializer expected in block <unit> at
<unknown file> line 1
> %a.gist;
{a => b, c => d} # human-readable, no 'e'!
> %a.perl;
{:a("b"), :c("d")} # round-trip form
> dd %a;
Hash %a = {:a("b"), :c("d")}
33. Bags are immutable
> my @a = ( 'a', 'b', 'b', 'c', 'c', 'c' );
[a b b c c c]
> my $b = @a.Bag;
bag(a, c(3), b(2))
> my $c = @a.Bag;
bag(a, c(3), b(2))