This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
GitHub Actions / perlcritic results
failed
Nov 12, 2023 in 4s
perlcritic failed
perlcritic failed with errors
Annotations
Check failure on line 68 in lib/LANraragi/Plugin/Scripts/ETagConverter.pm
github-actions / perlcritic results
Don't modify $_ in list functions
See page 114 of PBP
Raw output
`map', `grep' and other list operators are intended to transform arrays into other arrays by applying code to the array elements one by one. For speed, the elements are referenced via a `$_' alias rather than copying them. As a consequence, if the code block of the `map' or `grep' modify `$_' in any way, then it is actually modifying the source array. This IS technically allowed, but those side effects can be quite surprising, especially when the array being passed is `@_' or perhaps `values(%ENV)'! Instead authors should restrict in-place array modification to `for(@array) { ... }' constructs instead, or use `List::MoreUtils::apply()'.
Loading