Main > Programming > Libraries >

Tie::Proxy::Hash 1.01

Tie::Proxy::Hash 1.01

Sponsored Links

Tie::Proxy::Hash 1.01 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.019 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 843
Date added: 2007-07-05
Publisher: Martyn J. Pearce

Tie::Proxy::Hash 1.01 description

Tie::Proxy::Hash is a Perl module created to efficiently merge & translate hashes.

SYNOPSIS

my (%hash, $ref);
$ref = tie %hash, Tie::Proxy::Hash, (bart => +{a => 1,
b => 2},
maggie => +{a => 5,
c => 6,
e => 10},
);
$hash{a} == 1; # true
$hash{b} == 2; # true (bart supercedes maggie)
$hash{c} == 6; # true
! defined $hash{d}; # true
$hash{e} == 10; # true

$hash{c} = 9; # set in maggie
$hash{d} = 12; # set in default
$hash{f} = 11; # set in default

$ref->add_hash(lisa, +{d => 3, b => 4});
$hash{c} == 9; # true
$hash{b} == 2; # true (bart overrides lisa)
$hash{d} == 3; # true (lisa overrides default)
$hash{f} == 11; # true (only default knows f)

Proxy hash requests for one or more other hashes, with intermediate value translation.

Tie::Proxy::Hash merges hashes by maintaining a list of hashes to look up, and each key requested is looked up in each hash in order until a hit is found. Resultant values may be subject to a translating subr. In this way, hashes may be merged without the cost of by-value copying.

A default backing hash is provided to store values not present in other hashes.

Tying

$ref = tie %hash, Tie::Proxy::Hash,
bart => +{a => 1, b => 2},
maggie => +{a => 5, c => 6, e => 10} => sub {10*$_[0]},
;

Any arguments passed to tie are palmed off onto add_hash.

Retrieving Values

Values are retrieved by checking each hash in the order of insertion; the first hash found in which a given key exists supplies the value. The value is subject to translation if the given hash has an associated translator.

Tie::Proxy::Hash 1.01 Screenshot

Advertisements

Tie::Proxy::Hash 1.01 Keywords

Bookmark Tie::Proxy::Hash 1.01

Hyperlink code:
Link for forum:

Tie::Proxy::Hash 1.01 Copyright

WareSeeker periodically updates pricing and software information of Tie::Proxy::Hash 1.01 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Tie::Proxy::Hash 1.01 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Tie::ListKeyedHash is a system allowing the use of anonymous arrays as keys to a hash. Free Download
Set::Hash is a Perl module with hashes as objects with lots of handy methods and support for method chaining. Free Download
Tie::Eudora is a Perl module that can encode/decode emails, read/write emails in Eudora mailbox files. Free Download
DBIx::TableHash is a Perl module that can tie a hash to a mysql table + SQL utils. Free Download
Tie::Hash::KeysMask - control key aliasing by mask function, e.g. omit case of character distinction. Free Download
Tie::Hash::Stack is a Perl module which maintains an array of hashes like a stack. Free Download
Tie::HashHistory can track history of all changes to a tied hash. Free Download
What is a Perl module to find out about running services. Free Download