Destructure-Declare

 view release on metacpan or  search on metacpan

t/10-codegen.t  view on Meta::CPAN

}

# Behavioral: repeated execution is stable and correct (the lowering is reusable).
my @seen;
for my $n (1 .. 100) {
	let [$x, $y, @rest] = [$n, $n * 2, $n * 3, $n * 4];
	push @seen, "$x:$y:@rest";
}
is($seen[0],  '1:2:3 4',         'loop iteration 1');
is($seen[99], '100:200:300 400', 'loop iteration 100');
is(scalar(@seen), 100, 'all iterations ran');

done_testing;



( run in 1.425 second using v1.01-cache-2.11-cpan-4ab04211f4c )