File: README

package info (click to toggle)
libtie-aliashash-perl 1.02-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 96 kB
  • sloc: perl: 165; makefile: 2
file content (44 lines) | stat: -rw-r--r-- 1,228 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NAME
    Tie::AliasHash - Hash with aliases key (multiple keys, one value)

SYNOPSIS
      use Tie::AliasHash;

      tie %hash, 'Tie::AliasHash';
        
      $hash{ 'foo', 'bar' } = 'baz';
        
      print $hash{foo}; # prints 'baz'
      print $hash{bar}; # prints 'baz' too

      $hash{bar} = 'zab'; # $hash{foo} is changed too
      print $hash{foo}; # prints 'zab'

DESCRIPTION
    Tie::AliasHash creates hashes that can have multiple keys for a single
    value. This means that some keys are just 'aliases' for other keys.

    The example shown in the synopsys above creates a key 'foo' and an alias
    key 'bar'. The two keys share the same value, so that fetching either of
    them will always return the same value, and storing a value in one of
    them will change both.

HISTORY
    v1.02 (11 Mar 2016)
        Moved to github, using Build.PL instead of Makefile.PL, added
        license.

    v1.01 (26 Jun 2003)
        Fixed a bug in the EXISTS sub, now works as documented (thanks wk)

    v1.00 (07 Mar 2001)
        First released version

    v0.01 (20 Feb 2001)
        Original version; created by h2xs 1.20 with options

          -CAXn Tie::AliasHash

AUTHOR
    Aldo Calpini <dada@perl.it>