| 1 |
NAME |
| 2 |
Tie::AliasHash - Hash with aliases key (multiple keys, one value) |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
use Tie::AliasHash; |
| 6 |
|
| 7 |
tie %hash, 'Tie::AliasHash'; |
| 8 |
|
| 9 |
$hash{ 'foo', 'bar' } = 'baz'; |
| 10 |
|
| 11 |
print $hash{foo}; # prints 'baz' |
| 12 |
print $hash{bar}; # prints 'baz' too |
| 13 |
|
| 14 |
$hash{bar} = 'zab'; # $hash{foo} is changed too |
| 15 |
print $hash{foo}; # prints 'zab' |
| 16 |
|
| 17 |
DESCRIPTION |
| 18 |
Tie::AliasHash creates hashes that can have multiple keys for a single |
| 19 |
value. This means that some keys are just 'aliases' for other keys. |
| 20 |
|
| 21 |
The example shown in the synopsys above creates a key 'foo' and an alias |
| 22 |
key 'bar'. The two keys share the same value, so that fetching either of |
| 23 |
them will always return the same value, and storing a value in one of |
| 24 |
them will change both. |
| 25 |
|
| 26 |
HISTORY |
| 27 |
v1.02 (11 Mar 2016) |
| 28 |
Moved to github, using Build.PL instead of Makefile.PL, added |
| 29 |
license. |
| 30 |
|
| 31 |
v1.01 (26 Jun 2003) |
| 32 |
Fixed a bug in the EXISTS sub, now works as documented (thanks wk) |
| 33 |
|
| 34 |
v1.00 (07 Mar 2001) |
| 35 |
First released version |
| 36 |
|
| 37 |
v0.01 (20 Feb 2001) |
| 38 |
Original version; created by h2xs 1.20 with options |
| 39 |
|
| 40 |
-CAXn Tie::AliasHash |
| 41 |
|
| 42 |
AUTHOR |
| 43 |
Aldo Calpini <[email protected]> |
| 44 |
|