Path: usenet.cise.ufl.edu!newsfeeds.nerdc.ufl.edu!news.iag.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.corridex.com!nntp2.savvis.net!inetarena.com!not-for-mail
From: Russ Allbery <[email protected]>
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules
Subject: [ANNOUNCE] Tie::ShadowHash 0.6
Followup-To: comp.lang.perl.modules
Date: 6 Jun 1999 14:57:30 GMT
Organization: The Eyrie
Lines: 46
Approved: [email protected] (comp.lang.perl.announce)
Message-ID: <[email protected]>
NNTP-Posting-Host: halfdome.holdit.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cise.ufl.edu comp.lang.perl.announce:306 comp.lang.perl.modules:11672

I am pleased to announce the release of version 0.6 of my Tie::ShadowHash
module.  New in this release is an additional, special type of data source
that Tie::ShadowHash can manage.  You can pass it the name of a text file
and a reference to a sub, and it uses the list returned by the sub as the
key and value(s) for the hash.

This provides a trivial and painless way of generating hashes from space-
(or comma-, or anything-else-) separated text files for easier use in the
rest of your program.

General information about Tie::ShadowHash from the README:

                      Tie::ShadowHash version 0.6
               (Merge multiple data sources into a hash)

 If you have a bunch of separate sources of data in the form of Perl
 hashes, tied hashes (of whatever type, including on-disk databases tied
 with DB_File, GDBM_File, or similar modules), or text files that you
 want to turn into hashes, and you want to be able to query all of those
 sources of data at once for a particular key without having to check
 each one of them individually each time, this module is what you're
 looking for.  If you want to use a hash-like data source, even just one,
 but make modifications to its data over the course of your program that
 override its contents while your program runs but which don't have any
 permanent effect on it, then this module may be what you're looking for.

 Tie::ShadowHash lets you create a "shadow hash" that looks like a
 regular Perl hash to your program but behind the scenes queries a whole
 list of data sources.  All the data sources underneath have to also
 behave like Perl hashes, but that's the only constraint.  They can be
 regular Perl hashes or other tied hashes, including tied DB_File or
 GDBM_File hashes or the like to access on-disk databases.  All data
 sources are treated as read-only; modifications to any data is stored in
 the shadow hash itself, and subsequent accesses reflect any
 modifications, but none of the data sources are changed.

This latest release is currently winding its way through PAUSE, and is
at <URL:ftp://ftp.eyrie.org/pub/software/modules/ShadowHash-0.06.tar.gz>.

--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print