webmin / webmin

Powerful and flexible web-based server management control panel
http://www.webmin.com/
BSD 3-Clause "New" or "Revised" License
4.28k stars 640 forks source link

Perl Core Module List::Utils ?? #822

Open gnadelwartz opened 6 years ago

gnadelwartz commented 6 years ago

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:

in contrast if (any ({ $_ eq 'x'}, @array) )

what do you think?

iliajie commented 6 years ago

List::Utils are in since 5.007003. I don't think we're going to support Perl prior to that.

gnadelwartz commented 6 years ago

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.

swelljoe commented 6 years ago

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:

https://perldoc.perl.org/5.10.1/index.html

gnadelwartz commented 6 years ago

hi joe, thanks for your opinion, List::Utils is listed as core module in the linked documentation