use named var for module loop to prevent CPAN::Distribution from overwriting it

Since test_modules uses @_ without copying it, the loop can end up with aliases to read-only values.  Several levels deeper, CPAN::Distribution will try to overwrite it, causing an error.

This changes a loop to use a named var instead of $_.