| Module Info
| Add a review of Array-Diff
In response to Adina Adler - This module deals with an ordered list of things, so it's doing what it should (and does it quite well, I've previously used it). If you want to compare unordered things, I think you really want a module which deals with sets. I've used Set::Scalar to handled unordered things, with great success, maybe that'll get you what you need? If not Set::Scalar, then perhaps something else in the Set:: namespace?
It's not perfect, and what I need right now is perfection.
I'm trying to determine which elements of an array need to be written out to a database, and which need to be deleted. I was hoping for something that would prevent me from having to do existence cross-checks, and this looked promising. However, when I gave it the arrays ('111','222','333') and ('222','333','111), the response was that '111' was both added and deleted. Seeing that this uses Algorithm::Diff helps me to understand why that's happening, but that's not a correct answer, and therefore I'm not giving it a very high rating.
Yes, simple and gets the job done. Though I'm a bit curious with the implementation. If the interface is only to get number of deleted and added items (instead of positions of deletion/insertion), why depend on Algorithm::Diff (or use the name 'diff', for that matter).
To answer the 1-star review: What this modules gives over List::Compare is the simplicity. List::Compare POD gives you 1300 lines of man pages. This module does its job to get the difference of two arrays and nothing more than that. Quite well done.
What does this offer over List::Compare?