NAME
Hash::Case::Preserve - hash with enforced lower cased keys
CLASS HIERARCHY
Hash::Case::Preserve
is a Hash::Case
is a Tie::StdHash
is a Tie::Hash
SYNOPSIS
use Hash::Case::Preserve;
tie my(%cphash), 'Hash::Case::Preserve';
$cphash{StraNGeKeY} = 3;
print keys %cphash; # StraNGeKeY
print $cphash{strangekey}; # 3
print $cphash{STRANGEKEY}; # 3
DESCRIPTION
Hash::Case::Preserve extends Hash::Case, which lets you play various trics with hash keys. See Hash::Case for the other implementations.
METHODS
- tie HASH, 'Hash::Case::Preserve', [VALUES,] OPTIONS
-
Define HASH to be case insensitive, but case preserving. The hash is initialized with the VALUES, specified as ref-array or ref-hash.
OPTIONS is a list of key/value pairs, which specify how the hash must handle preservation. Current options:
keep => 'FIRST' | 'LAST'
Which casing is the prefered 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.
SEE ALSO
Hash::Case Hash::Case::Lower Hash::Case::Upper
AUTHOR
Mark Overmeer (mark@overmeer.net). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
VERSION
This code is beta, version 1.002
Copyright (c) 2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 129:
You forgot a '=back' before '=head1'