[Koha-devel] QA : List::Util any ?

Tomas Cohen Arazi tomascohen at gmail.com
Sat Nov 20 00:41:29 CET 2021


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 at 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 at biblibre.com>
> Software and system maintainer 🦄
> BibLibre, France
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20211119/279761c7/attachment.htm>


More information about the Koha-devel mailing list