Tie-ShadowHash
view release on metacpan or search on metacpan
lib/Tie/ShadowHash.pm view on Meta::CPAN
This module merges together multiple sets of data in the form of hashes into a
data structure that looks to Perl like a single simple hash. When that hash
is accessed, the data structures managed by that shadow hash are searched in
order they were added for that key. This allows the rest of a program simple
and convenient access to a disparate set of data sources.
The shadow hash can be modified, and the modifications override the data
sources, but modifications aren't propagated back to the data sources. In
other words, the shadow hash treats all data sources as read-only and saves
your modifications in an overlay in memory. This lets you make changes to the
shadow hash and have them reflected later in your program without affecting
the underlying data in any way. This behavior is the reason why it is called
a shadow hash.
=head1 Constructing the hash
Tie::ShadowHash takes one or more underlying data sources as additional
arguments to tie(). Data sources can also be added later by calling the add()
method on the object returned by tie().
( run in 1.561 second using v1.01-cache-2.11-cpan-49f99fa48dc )