1Hash::Case::Preserve(3)User Contributed Perl DocumentatioHnash::Case::Preserve(3)
2
3
4

NAME

6       Hash::Case::Preserve - hash with enforced lower cased keys
7

INHERITANCE

9        Hash::Case::Preserve
10          is a Hash::Case
11          is a Tie::StdHash
12

SYNOPSIS

14        use Hash::Case::Preserve;
15        tie my(%cphash), 'Hash::Case::Preserve';
16        $cphash{StraNGeKeY} = 3;
17        print keys %cphash;         # StraNGeKeY
18        print $cphash{strangekey};  # 3
19        print $cphash{STRANGEKEY};  # 3
20

DESCRIPTION

22       Hash::Case::Preserve extends Hash::Case, which lets you play various
23       trics with hash keys. This extension implements a fake hash which is
24       case-insentive. The keys are administered in the casing as they were
25       used: case-insensitive but case-preserving.
26
27       Extends "DESCRIPTION" in Hash::Case.
28

METHODS

30       Extends "METHODS" in Hash::Case.
31
32   Constructors
33       Extends "Constructors" in Hash::Case.
34
35       $obj->addHashData(HASH)
36           Inherited, see "Constructors" in Hash::Case
37
38       $obj->addPairs(PAIRS)
39           Inherited, see "Constructors" in Hash::Case
40
41       $obj->setHash(HASH)
42           Inherited, see "Constructors" in Hash::Case
43
44       tie(HASH, 'Hash::Case::Preserve', [VALUES,] OPTIONS)
45           Define HASH to be case insensitive, but case preserving.  The hash
46           is initialized with the VALUES, specified as ref-array (passing a
47           list of key-value pairs) or ref-hash.
48
49           OPTIONS is a list of key/value pairs, which specify how the hash
50           must handle preservation.  Current options:
51
52            -Option--Default
53             keep    'LAST'
54
55           keep => 'FIRST' | 'LAST'
56             Which casing is the preferred casing?  The FIRST appearance or
57             the LAST.  Only stores will affect the casing, deletes will undo
58             the definition.  Defaults to LAST, which is slightly faster.
59

SEE ALSO

61       This module is part of Hash-Case distribution version 1.05, built on
62       February 06, 2020. Website: http://perl.overmeer.net/CPAN/
63

LICENSE

65       Copyrights 2002-2020 by [Mark Overmeer <markov@cpan.org>]. For other
66       contributors see ChangeLog.
67
68       This program is free software; you can redistribute it and/or modify it
69       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
70
71
72
73perl v5.32.1                      2021-01-27           Hash::Case::Preserve(3)
Impressum