I would like to open a discussion regarding a module name for a new
ordered-hash module that I've been developing under the proposed name
"Data::Hasray" (short for hashed array).
Here's some info from my README file:
FROM THE SYNOPSIS
Data::Hasray provides an object-oriented interface to tied, ordered
hashes. Hash elements may be assigned keys explicitly or automatically
in mix-and-match fashion like arrays in PHP.
It also includes support for trees of nested hasrays, tree traversal,
and conversion to and from native Perl data structures.
Suggested uses include structured configuration information or HTTP
query parameters in which order may at least sometimes be significant,
for passing mixed positional and named parameters, or for porting PHP
code.
ALTERNATIVES (FROM SEE ALSO)
Array::AsHash
An array wrapper to manage elements as key/value pairs
Array::Assign
Allows you to assign names to array indexes
Array::OrdHash
Like Array::Assign, but with native Perl syntax
Tie::IxHash
An ordered hash implementation with a different interface and data
structure and without auto-indexed keys and some of Data::Hasray's
other features
Tie::Hash::Array
Hashes stored as arrays in key sorting-order
RATIONALE AND DIFFERENCES
Hashes are a natural data structure for organizing information, and arrays
are a natural data structure for building ordered lists. Sometimes you
want your organized data (hashes) to be ordered too, like an array. One
example would be resource configuration information, organized by
resource name, for resources that must be loaded in a specific order
(e.g. due to dependencies) rather than some pseudo-random order.
Some of the key features that distinguish Data::Hasray from other
implementations are as follows:
1) The ability to mix-and-match values with and without explicit keys.
Values without keys are assigned a sequential index as key
automatically. PHP, for example, also supports this.
2) Built-in path traversal that supports auto-vivification of nested
data structures just like you would expect when using native hashrefs
and arrayrefs.
3) Easy conversion to or from native Perl hashes and arrays either at
the level of a single hasray or as a nested tree of hasrays, with
either an array-based or hash-based emphasis.
** CUT **
The full pod docs show more about how the interface and syntax differs
from other implementations, and I'll be happy to post them upon request.
- Brian
--
Brian Katzung, Kappa Computer Solutions, LLC
Leveraging UNIX, GNU/Linux, open source, and custom
software solutions for business and beyond
Phone: 877.367.8837 x1 http://www.kappacs.com