Nested anonymous sub that contains a while loop with an array assignment can generate bad code. For example (from DBI.pm):
my $connect_closure = sub {
...
if(%$apply) {
...
while ( my ($a, $v) = each %$apply) {
eval { $dbh->{$a} = $v }; # assign in void context to avoid re-FETCH
warn $@ if $@;
}
} # Pythonizer thinks the anonymous sub ends here
...
};
Nested anonymous sub that contains a while loop with an array assignment can generate bad code. For example (from DBI.pm):