-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterate over keys or values of hash, not hash itself #3037
Comments
On rel-11_0, I already identified the relevant places (see below), but I also want to check rel-10_1 and rel-10_0, therefor PR has to wait a bit.
|
Yes, these loops are strange. @stefanhaerter, could you check whether there is a Perl::Critic policy that covers these cases? |
Yes, I think this is a very good idea - I thought about writing a CodePolicy plugin by myself, but if Perl::Critic already covers this, this would be great. |
@bschmalhofer At a quick glanze, I couldn't find anything that matches this need at https://metacpan.org/dist/Perl-Critic/view/lib/Perl/Critic/PolicySummary.pod. Perhaps a plugin is needed. |
Closed with merging the PRs. |
…actually over %Param and thus, checking is needed.
…actually over %Param and thus, checking is needed.
At a few places, for loops are iterating over a hash, not keys or values. While this is functionaly fine because everywhere there is a check if the iterator is a valid key of the hash, I would consider it a bad coding practice and thus fix it nonetheless.
The text was updated successfully, but these errors were encountered: