-
Notifications
You must be signed in to change notification settings - Fork 44
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
Thank you perl critic #53
Conversation
Beware the slavish use of critic, they are recommendations that can be Example, grep is often faster than any because it is built in. At least Check for a potential old commit that removed a previous any and replaced And the file_content change seems a bit flippant... Adam
|
Point taken on grep vs. any. In this context, any is taking 20% longer (on 5.16.3) than grep if they both process the same number of items. Since not processing the same number of items is an error condition for the method, you can it assume it almost never happens, so any doesn't help. That said, the any is more clear about intent, the grep on my machine takes on the order of 2 microseconds, and one could expect that merge() does not get used intensively, so I'd say it's a toss-up whether to revert the change. $source was renamed because that name was already in use earlier in the same function. |
7322e31
to
7535bc6
Compare
Went through them, and added those i agreed with, after some tidying. I think the only one i didn't agree with was the any, since it didn't actually speed things up. Will be included in the next release. |
Many small changes in response to Perl::Critic warnings.