Tie::Hash::Identity - A hash that always returns the key
Version 0.01
use Tie::Hash::Identity; my %hash; tie %hash, 'Tie::Hash::Identity'; $hash{abc} eq 'abc'; # true $hash{1+2+3} eq '6'; # true
A hash that always returns the key.
It's useful when interpolating EXPR in a double quoted string.
Maybe you should try Hash::Identity with a better importing interface.
It only support for retrieving data. Never storing data back, nor trying to iterate over it.
Hash::Identity - same thing, with a better importing interface.
Cindy Wang (CindyLinz)
Please report any bugs or feature requests to bug-tie-hash-identity at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Tie-Hash-Identity. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-tie-hash-identity at rt.cpan.org
Copyright 2010 Cindy Wang (CindyLinz).
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Tie::Hash::Identity, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Hash::Identity
CPAN shell
perl -MCPAN -e shell install Tie::Hash::Identity
For more information on module installation, please visit the detailed CPAN module installation guide.