Hash::Case::Preserve3pm
Hash with enforced lower cased keys
Usage
use Hash::Case::Preserve;tie my(%cphash), 'Hash::Case::Preserve';$cphash{StraNGeKeY} = 3;print keys %cphash; # StraNGeKeYprint $cphash{strangekey}; # 3print $cphash{STRANGEKEY}; # 3
Inheritance
Hash::Case::Preserveis a Hash::Caseis a Tie::StdHash
Overview
Hash::Case::Preserve extends Hash::Case, which lets you play various trics with hash keys. This extension implements a fake hash which is case-insentive. The keys are administered in the casing as they were used: case-insensitive but case-preserving.
Extends "DESCRIPTION" in Hash::Case.
Methods
Extends "METHODS" in Hash::Case.
Constructors
Extends "Constructors" in Hash::Case.
- tie
%hash, 'Hash::Case::Preserve', [$values,] %options -
Define
%hashto be case insensitive, but case preserving. The hash is initialized with the$values, specified as ARRAY (passing flat key-value pairs) or HASH. Improves base, see "Constructors" in Hash::Case-Option--Defaultkeep 'LAST'- keep => 'FIRST'|'LAST'
-
Which casing is the preferred casing? The FIRST appearance or the LAST. Only stores will affect the casing, deletes will undo the definition. Defaults to LAST, which is slightly faster.
Hidden object access
Extends "Hidden object access" in Hash::Case.
$obj->
|
Inherited, see "Hidden object access" in Hash::Case |
|---|---|
$obj->
|
Inherited, see "Hidden object access" in Hash::Case |
$obj->
|
Inherited, see "Hidden object access" in Hash::Case |
Releases
10 releases since Debian 5.0 (Lenny); the text changed 5 times.