.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Hash::Case::Preserve 3" .TH Hash::Case::Preserve 3 2026-02-05 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Hash::Case::Preserve \- hash with enforced lower cased keys .SH INHERITANCE .IX Header "INHERITANCE" .Vb 3 \& Hash::Case::Preserve \& is a Hash::Case \& is a Tie::StdHash .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 6 \& use Hash::Case::Preserve; \& tie my(%cphash), \*(AqHash::Case::Preserve\*(Aq; \& $cphash{StraNGeKeY} = 3; \& print keys %cphash; # StraNGeKeY \& print $cphash{strangekey}; # 3 \& print $cphash{STRANGEKEY}; # 3 .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" 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. .PP Extends "DESCRIPTION" in Hash::Case. .SH METHODS .IX Header "METHODS" Extends "METHODS" in Hash::Case. .SS Constructors .IX Subsection "Constructors" Extends "Constructors" in Hash::Case. .ie n .IP "tie \fR\fB%hash\fR\fB\fR, \*(AqHash::Case::Preserve\*(Aq, [$values,] %options" 4 .el .IP "tie \fR\f(CB%hash\fR\fB\fR, \*(AqHash::Case::Preserve\*(Aq, [$values,] \f(CW%options\fR" 4 .IX Item "tie %hash, 'Hash::Case::Preserve', [$values,] %options" Define \f(CW%hash\fR to be case insensitive, but case preserving. The hash is initialized with the \f(CW$values\fR, specified as ARRAY (passing flat key\-value pairs) or HASH. Improves base, see "Constructors" in Hash::Case .Sp .Vb 2 \& \-Option\-\-Default \& keep \*(AqLAST\*(Aq .Ve .RS 4 .IP "keep => \*(AqFIRST\*(Aq|\*(AqLAST\*(Aq" 2 .IX Item "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. .RE .RS 4 .RE .SS "Hidden object access" .IX Subsection "Hidden object access" Extends "Hidden object access" in Hash::Case. .ie n .IP $obj\->\fBaddHashData\fR(\e%data) 4 .el .IP \f(CW$obj\fR\->\fBaddHashData\fR(\e%data) 4 .IX Item "$obj->addHashData(%data)" Inherited, see "Hidden object access" in Hash::Case .ie n .IP $obj\->\fBaddPairs\fR(@pairs) 4 .el .IP \f(CW$obj\fR\->\fBaddPairs\fR(@pairs) 4 .IX Item "$obj->addPairs(@pairs)" Inherited, see "Hidden object access" in Hash::Case .ie n .IP $obj\->\fBsetHash\fR(\e%data) 4 .el .IP \f(CW$obj\fR\->\fBsetHash\fR(\e%data) 4 .IX Item "$obj->setHash(%data)" Inherited, see "Hidden object access" in Hash::Case .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Hash\-Case version 1.07, built on January 26, 2026. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH LICENSE .IX Header "LICENSE" For contributors see file ChangeLog. .PP This software is copyright (c) 2002\-2026 by Mark Overmeer. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.