Open gnadelwartz opened 6 years ago
List::Utils are in since 5.007003
. I don't think we're going to support Perl prior to that.
then it should no problem, IMHO Jamie wants to be compatible with 5.10.
List::Utils offer also uniqe
where @qooob has made a support function for ... so it may possible use List::Utils instead.
You should never hesitate to use core modules, as long as they've been in since 5.10.1. Jamie doesn't mind, and I strongly prefer it to implementing it from scratch. You can see the available modules in that version from here:
hi joe, thanks for your opinion, List::Utils is listed as core module in the linked documentation
https://perldoc.perl.org/List/Util.html
Guy's,
its stated that List::Utils is always installed with perl (core). can I use it in webmin or at least for authentic-theme, or do we have to support older perl versions where its not core?
e.g. to check if an element is in array I use
if (grep ({ $_ eq 'x'}, @array) )
even is grep is fast it has some downsides:if ()
in contrast
if (any ({ $_ eq 'x'}, @array) )
what do you think?