NAME

Perl::Critic::Policy::ControlStructures::ProhibitMultipleSubscripts - forbid using the same subscript multiple times in a loop

AFFILIATION

This policy as a part of the Perl::Critic::PolicyBundle::SNEZ distribution.

DESCRIPTION

Conway suggests only extracting specific values of arrays and hashes in loops exactly once and assigning them to variables for later access. Not only does it make the code less cluttered with repeated lookups, it is also more efficient in many cases.

CONFIGURATION

This Policy is not configurable except for the standard options.

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.