Hi, This message is mainly for QA team but feel free to comment :) In https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127606 ... unless grep( /^$i$/, @branchcodes ); In my opinion seeing two veru different $ is disturbing. Should we tell to use List::Util any ? It is already used in many places. Best regards, -- Fridolin SOMERS <fridolin.somers@biblibre.com> Software and system maintainer 🦄 BibLibre, France
If you are not using the output of grep (it returns all matching elements) you should be using 'any', which short-circuits on the first match. And List::Util is a core library nowadays. That's why I use it in those scenarios and suggest it on QA as well. Best regards El vie., 19 nov. 2021 18:20, Fridolin SOMERS <fridolin.somers@biblibre.com> escribió:
Hi,
This message is mainly for QA team but feel free to comment :)
In https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127606 ... unless grep( /^$i$/, @branchcodes );
In my opinion seeing two veru different $ is disturbing.
Should we tell to use List::Util any ? It is already used in many places.
Best regards,
-- Fridolin SOMERS <fridolin.somers@biblibre.com> Software and system maintainer 🦄 BibLibre, France _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
participants (2)
-
Fridolin SOMERS -
Tomas Cohen Arazi