Mark Garder recently published the article A list of Perl list processing modules, a detailed and factual, unopinionated listing of eight Perl modules that manipulate lists. So, naturally, when his factual, unopinionated listing was cross posted to Redit, the first comment was the emotional, highly opinionated: “So how do we go about fixing this mess? Because it is a mess.”.
Yes, the comment was mine.
My intent was to see if we could create One List:: To Rule Them All. Not only does it confuse people who want to learn Perl to have various list functions in different modules (and to have functions that share a name across modules work differently), but it also confuses Perl veterans.
And yes, once again, that’s me.
After some consideration, some education and a conversation with the current maintainer of List::Util, the module of list functions that come with Perl itself, it seemed to me that the first order of operations was to detail just how much of a “mess” this was. So, on Sunday afternoon, while waiting to go to the airport to pick up my son, and while watching Phil Mickelson winning the PGA championship at a record 50 years old, I put together the following spreadsheet:
I hope that this can serve a as reference for people to see what's available and where it is available. Yes, it may not have a long shelf life, but I learned a bit more about the state of the
List:: namespace. Hopefully, you'll learn a bit too.