Perl Modules for Array/Set Handling

### Purpose

To cross-check a personal selection of modules which offer:

Array and Set modules | Method lists
" | Overloaded methods

Module names are read from data/module.list.ini, which is shipped with the distro.
Each module's data has an indicator - 'include = Yes/No' - which makes it easy to edit & re-run.
Further, each module has an indicator - 'overload_type = 1/2/3' - to specify the syntax to look for when processing overloads.
Per-module notes are handled using the same mechanism.
Excluded modules are listed at the end of this report.

### Modules included

Name | Version | Method count | Notes
1: Array::AsObject | 1.02 | 41 |
2: Object::Array | 0.060 | 43 |
3: Set::Array | 0.26 | 47 |
4: Set::Bag | 1.009 | 17 | Supports multisets [*]
5: Set::Light | 0.04 | 6 |
6: Set::Object | 1.28 | 39 |
7: Set::Scalar | 1.25 | 44 |
8: Set::SortedArray | 0.02 | 21 |
9: Set::Tiny | 0.01 | 23 |
10: Set::Toolkit | 0.11 | 16 |
Name | Version | Method count | Notes

[*] Multisets means new() takes a hash, so elements are (name, value) pairs.

Method names are found by scanning the source for /^sub.../.
Method names starting with '_' are ignored.
Also ignored are indented subs as in Set::Toolkit::TieArray, which is within the source of Set::Toolkit.
Sub-class files for Object::Array and Set::Scalar have been scanned and included.
Scanning the source means modules must be installed, but no attempt is made to load them at run-time.
Source files are found by running 'mwhere' which is shipped with the marvellous App::moduleswhere.
Version numbers are found by running 'mversion' which is shipped with the marvellous Module::Version.

### Methods

Method | Array::AsObject | Object::Array | Set::Array | Set::Bag | Set::Light | Set::Object | Set::Scalar | Set::SortedArray | Set::Tiny | Set::Toolkit
1: AUTOLOAD |  |  |  |  |  | Yes |  |  |  |
2: DESTROY |  |  |  |  |  |  | Yes |  |  |
3: ELEMENT_SEPARATOR |  |  |  |  |  |  | Yes |  |  |
4: SET_FORMAT |  |  |  |  |  |  | Yes |  |  |
5: STORABLE_freeze |  |  |  |  |  | Yes |  |  |  |
6: STORABLE_thaw |  |  |  |  |  | Yes |  |  |  |
7: after |  | Yes |  |  |  |  |  |  |  |
8: after_incl |  | Yes |  |  |  |  |  |  |  |
9: all |  | Yes |  |  |  |  |  |  |  |
10: any |  | Yes |  |  |  |  |  |  |  |
11: append |  |  | Yes |  |  |  |  |  |  |
12: apply |  | Yes |  |  |  |  |  |  |  |
13: are_equal |  |  |  |  |  |  | Yes. eq |  |  |
14: as_array |  |  |  |  |  |  |  |  |  | Yes. @{}
15: as_hash | Yes |  | Yes |  |  |  |  |  |  |
16: as_string |  |  |  |  |  | Yes. "" | Yes. "" | Yes | Yes | Yes. ""
17: as_string_callback |  |  |  |  |  | Yes | Yes | Yes |  |
18: asymmetric_difference |  |  |  |  |  |  |  | Yes |  |
19: at | Yes |  | Yes |  |  |  |  |  |  |
20: bag |  |  | Yes. & | Yes. "" |  |  |  |  |  |
21: before |  | Yes |  |  |  |  |  |  |  |
22: before_incl |  | Yes |  |  |  |  |  |  |  |
23: binary_intersection |  |  |  |  |  |  |  | Yes. * |  |
24: cartesian_product |  |  |  |  |  |  | Yes |  |  |
25: cartesian_product_iterator |  |  |  |  |  |  | Yes |  |  |
26: clear | Yes | Yes | Yes |  |  |  | Yes |  | Yes |
27: clone |  |  |  |  |  |  | Yes |  | Yes. copy |
28: cmp |  |  |  |  |  |  | Yes |  |  |
29: compact | Yes |  | Yes |  |  |  |  |  |  |
30: compare |  |  |  |  |  | Yes | Yes. <=> | Yes |  |
31: complement |  |  | Yes | Yes. neg |  |  | Yes |  |  |
32: contains |  | Yes |  |  |  | Yes |  |  | Yes. has |
33: copy |  |  |  | Yes. = |  |  |  |  |  |
34: count | Yes |  | Yes |  |  |  |  |  |  |
35: cpop |  |  | Yes |  |  |  |  |  |  |
36: cshift |  |  | Yes |  |  |  |  |  |  |
37: delete | Yes | Yes | Yes | Yes. -= | Yes. remove | Yes | Yes |  |  |
38: delete_at | Yes |  | Yes |  |  |  |  |  |  |
39: difference | Yes |  | Yes. - | Yes. - |  | Yes. - | Yes | Yes. - | Yes |
40: duplicates |  |  | Yes |  |  |  |  |  |  |
41: each |  |  |  |  |  |  | Yes |  |  |
42: elem |  | Yes |  |  |  |  |  |  |  |
43: element |  |  |  |  |  | Yes | Yes |  | Yes. member |
44: elements |  |  |  | Yes |  | Yes | Yes |  | Yes. members | Yes
45: elems |  | Yes |  |  |  |  |  |  |  |
46: empty_clone |  |  |  |  |  |  | Yes |  |  |
47: eq |  |  |  | Yes. eq |  |  |  |  |  |
48: equal |  |  |  |  |  | Yes. == |  |  |  |
49: err | Yes |  |  |  |  |  |  |  |  |
50: errmsg | Yes |  |  |  |  |  |  |  |  |
51: exists | Yes | Yes | Yes |  | Yes. contains |  |  |  |  |
52: extend |  |  |  |  |  |  | Yes |  |  |
53: false |  | Yes |  |  |  |  |  |  |  |
54: fill | Yes |  | Yes |  |  |  | Yes |  |  |
55: find |  |  |  |  |  |  |  |  |  | Yes
56: first | Yes |  | Yes |  |  |  |  |  |  | Yes
57: first_index |  | Yes |  |  |  |  |  |  |  |
58: first_value |  | Yes |  |  |  |  |  |  |  |
59: firstidx |  | Yes |  |  |  |  |  |  |  |
60: firstval |  | Yes |  |  |  |  |  |  |  |
61: flatten |  |  | Yes |  |  |  |  |  |  |
62: foreach |  |  | Yes |  |  |  |  |  |  |
63: grab |  |  |  | Yes |  |  |  |  |  |
64: grep |  | Yes |  |  |  |  |  |  |  |
65: has |  |  |  |  |  | Yes | Yes |  |  |
66: have_same_universe |  |  |  |  |  |  | Yes |  |  |
67: impose |  |  | Yes |  |  |  |  |  |  |
68: index | Yes |  | Yes |  |  |  |  |  |  |
69: indexes |  | Yes |  |  |  |  |  |  |  |
70: indices |  |  | Yes |  |  |  |  |  |  |
71: insert |  |  |  | Yes. += | Yes |  | Yes |  | Yes | Yes
72: insert_after |  | Yes |  |  |  |  |  |  |  |
73: insert_after_string |  | Yes |  |  |  |  |  |  |  |
74: intersection | Yes |  | Yes. * | Yes. & |  | Yes | Yes | Yes | Yes |
75: invert |  |  |  |  |  | Yes | Yes |  | Yes |
76: is_disjoint |  |  |  |  |  | Yes | Yes. != | Yes. != | Yes |
77: is_empty | Yes |  | Yes |  | Yes. is_null |  |  |  |  | Yes
78: is_equal | Yes |  | Yes. == |  |  |  | Yes. == | Yes. == | Yes |
79: is_key |  |  |  |  |  | Yes |  |  |  |
80: is_null |  |  |  |  |  |  | Yes |  | Yes. is_empty |
81: is_ordered |  |  |  |  |  |  |  |  |  | Yes
82: is_proper_subset |  |  |  |  |  |  | Yes. < | Yes. < | Yes |
83: is_proper_superset |  |  |  |  |  |  | Yes. > | Yes. > | Yes |
84: is_properly_intersecting |  |  |  |  |  |  | Yes |  | Yes |
85: is_subset | Yes |  |  |  |  |  | Yes. <= | Yes. <= | Yes |
86: is_superset |  |  |  |  |  |  | Yes. >= | Yes. >= | Yes |
87: is_unique |  |  |  |  |  |  |  |  |  | Yes
88: is_universal |  |  |  |  |  |  | Yes |  |  |
89: isa |  | Yes |  |  |  |  |  |  |  |
90: ish_int |  |  |  |  |  | Yes |  |  |  |
91: join |  | Yes | Yes |  |  |  |  |  |  |
92: last | Yes |  | Yes |  |  |  |  |  |  | Yes
93: last_index |  | Yes |  |  |  |  |  |  |  |
94: last_value |  | Yes |  |  |  |  |  |  |  |
95: lastidx |  | Yes |  |  |  |  |  |  |  |
96: lastval |  | Yes |  |  |  |  |  |  |  |
97: length | Yes |  | Yes |  |  |  |  |  |  |
98: list | Yes |  |  |  |  |  |  |  |  |
99: map |  | Yes |  |  |  |  |  |  |  |
100: max | Yes |  | Yes |  |  |  |  |  |  |
101: maximize |  |  |  | Yes. |= |  |  |  |  |  |
102: member |  |  |  |  |  | Yes |  |  |  |
103: members |  |  |  |  |  |  |  | Yes |  |
104: merge |  |  |  |  |  |  |  | Yes. + |  |
105: min | Yes |  |  |  |  |  |  |  |  |
106: minimize |  |  |  | Yes. &= |  |  |  |  |  |
107: minmax |  | Yes |  |  |  |  |  |  |  |
108: natatime |  | Yes |  |  |  |  |  |  |  |
109: ne |  |  |  | Yes. ne |  |  |  |  |  |
110: new | Yes | Yes | Yes | Yes | Yes |  | Yes | Yes | Yes | Yes
111: new_presorted |  |  |  |  |  |  |  | Yes |  |
112: none |  | Yes |  |  |  |  |  |  |  |
113: not_equal | Yes |  | Yes. != |  |  | Yes. != |  |  |  |
114: not_subset | Yes |  |  |  |  |  |  |  |  |
115: notall |  | Yes |  |  |  |  |  |  |  |
116: null |  |  |  |  |  |  | Yes |  |  |
117: op_intersection |  |  |  |  |  | Yes. * |  |  |  |
118: op_invert |  |  |  |  |  | Yes. / |  |  |  |
119: op_symm_diff |  |  |  |  |  | Yes. % |  |  |  |
120: op_union |  |  |  |  |  | Yes. + |  |  |  |
121: ordered_elements |  |  |  |  |  |  |  |  |  | Yes
122: over_delete |  |  |  | Yes |  |  |  |  |  |
123: pack |  |  | Yes |  |  |  |  |  |  |
124: pop | Yes | Yes | Yes. >>= |  |  |  |  |  |  |
125: power_set |  |  |  |  |  |  | Yes |  |  |
126: power_set_iterator |  |  |  |  |  |  | Yes |  |  |
127: print |  |  | Yes |  |  |  |  |  |  |
128: proper_subset |  |  |  |  |  | Yes. < |  |  |  |
129: proper_superset |  |  |  |  |  | Yes. > |  |  |  |
130: push | Yes | Yes | Yes. << |  |  |  |  |  |  |
131: randomize | Yes |  | Yes |  |  |  |  |  |  |
132: remove |  |  |  |  |  |  |  |  | Yes. delete | Yes
133: reverse | Yes |  | Yes |  |  |  |  |  |  |
134: rindex | Yes |  | Yes |  |  |  |  |  |  |
135: rotate | Yes |  | Yes |  |  |  |  |  |  |
136: search |  |  |  |  |  |  |  |  |  | Yes
137: set | Yes |  | Yes |  |  | Yes |  |  |  |
138: shift | Yes | Yes | Yes. >> |  |  |  |  |  |  |
139: size |  | Yes |  |  | Yes |  | Yes. bool | Yes | Yes | Yes
140: slice |  | Yes |  |  |  |  |  |  |  |
141: sort | Yes |  | Yes |  |  |  |  |  |  |
142: splice | Yes | Yes | Yes |  |  |  |  |  |  |
143: strengthen |  |  |  |  |  | Yes |  |  |  |
144: strong_pkg |  |  |  |  |  | Yes |  |  |  |
145: subset |  |  |  |  |  | Yes. <= |  |  |  |
146: sum |  |  |  | Yes. + |  |  |  |  |  |
147: superset |  |  |  |  |  | Yes. >= |  |  |  |
148: symmetric_difference | Yes |  | Yes. % |  |  | Yes | Yes | Yes. % | Yes. unique |
149: tie_array_pkg |  |  |  |  |  | Yes |  |  |  |
150: tie_hash_pkg |  |  |  |  |  | Yes |  |  |  |
151: true |  | Yes |  |  |  |  |  |  |  |
152: union | Yes |  | Yes. + | Yes. | |  | Yes | Yes | Yes | Yes |
153: uniq |  | Yes |  |  |  |  |  |  |  |
154: unique | Yes |  | Yes |  |  | Yes | Yes | Yes. / |  |
155: universe |  |  |  |  |  |  | Yes |  |  |
156: unordered_elements |  |  |  |  |  |  |  |  |  | Yes
157: unshift | Yes | Yes | Yes. <<= |  |  |  |  |  |  |
158: version | Yes |  |  |  |  |  |  |  |  |
159: weak_pkg |  |  |  |  |  | Yes |  |  |  |
160: weak_set |  |  |  |  |  | Yes |  |  |  |
161: weaken |  |  |  |  |  | Yes |  |  |  |
Method | Array::AsObject | Object::Array | Set::Array | Set::Bag | Set::Light | Set::Object | Set::Scalar | Set::SortedArray | Set::Tiny | Set::Toolkit

A cell containing 'Yes' means that module has a method of that name.
A token after 'Yes' is the overloaded operator defined in that module for that method.

Just because 2 modules have a method with the same name does not mean the subs' behaviour is identical.
Obviously names like symmetric_difference() are presumably the same, but there is a catch:
One module may expect you to call methods as functions, while the other uses methods (with $obj -> X() ).
As always, RTFM!

In order to make life difficult:

Object::Array fiddles a list of method names copied from List::MoreUtils.
Set::Light has 2 aliases for exists: has and contains.
Set::Object and Set::Toolkit define some overloads via subs. These are ignored.

### Module excluded

Name | Notes
1: Array::Compare | Array::Compare has very limited (focused) functionality
2: Array::Uniq | Array::Uniq likewise
3: Array::Utils | Array::Utils likewise
4: Bit::Vector | Bit::Vector is sophisticated, but is more like an underlying support mechanism for sets and hence leaves a lot up to the end-user
5: EO::Array | EO::Array is an OO wrapper around Perl's array type
6: Set::DynamicGroups | Set::DynamicGroups handles multisets, as does Set::Bag. It's designed to allow groups to be defined dynamically by rules based on other groups. It has partial support for nested groups
7: Set::Groups | Set::Groups supports nested groups, and hence a completely different set of methods
8: Set::Hash | Set::Hash allows you to create strings as objects and use OO-style methods on them. It's a sub-class of Set::Array
9: Set::NestedGroups | Set::NestedGroups is like Set::Groups
10: Set::Relation | Set::Relation is an emulator for RDBMS-style relational data
Name | Notes

### Environment

Author | Ron Savage
Date | 2012-05-22
OS | Debian V 6.0.4
Perl | 5.14.2