Announcing Perl::Critic::Policy::ControlStructures::ProhibitForeachHandle

A couple days ago I uploaded a Perl-Critic policy to find and complain about things like foreach ( <FOO> ) {...}. The problem (or at least potential problem) with this is that it sucks the entire file into memory before performing the first iteration. Which may be what you wanted, but may not be too.

I plan to leave it at a development release for a couple weeks to allow time for comments and so on. You can find it at its CPAN Search page.

Leave a comment

About Tom Wyant

user-pic I blog about Perl.