Tie::ShadowHash

Description

This is another small module that I wrote while working on News::Gateway. I needed a way to combine data from a read-only tied DBM file with additional key/value pairs that were determined at run-time in a fashion that didn't require lots of special-casing all over the code. Hence this module.

Tie::ShadowHash overlays a series of hashes, which can be normal hashes, tied hashes, or even hashes made up from arrays, text files, or run-time assignments, so that any lookups in the resulting tied hash go through each data source in order. This allows values to be changed at run-time without changing the underlying read-only data source, or to easily combine multiple sources of data.

The module is very simple and works. The only reason why I haven't given it a 1.x version number yet is that I've not yet used it for a major project and therefore don't know if there are any significant holes in its implementation.

Requirements

The only requirement is Perl 5.003 or later.

Download

The module:

Tie::ShadowHash 0.07 2002-07-28 Download PGP signature

An archive of older releases is also available.

Documentation:

License

Copyright 1999, 2002 by Russ Allbery <rra@stanford.edu>

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. This means that you may choose between the two licenses that Perl is released under: the GNU GPL and the Artistic License. Please see your Perl distribution for the details and copies of the licenses.

Last spun 2008-10-13 from thread modified 2008-09-16