Subject: | closed_over has a strange return in list context |
The following oneliner produces some rather bizarre output:
~$ perl -MData::Dumper -MPadWalker=closed_over -e 'my $x = {}; my $y = []; warn Dumper closed_over sub { my $n = {%$x}; my $m = {%$y} }'
$VAR1 = {
'$y' => \[],
'$x' => \{}
};
$VAR2 = {
'2' => $VAR1->{'$x'},
'5' => $VAR1->{'$y'}
};
The second return value is not documented, and looks rather unintentional. Perhaps a sign of a deeper memory-oddness bug?
Cheers