in reply to foreach argument modification inside loop, followed by return from loop

I can't imagine it ever causing problems. It's really the iteration of the loop after the modification where foreach can get confused.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
can get confused.
  • Comment on Re: foreach argument modification inside loop, followed by return from loop
  • Download Code