Hash-Abbrev
this module creates an abbreviation hash where each abbreviation of the key is
read/write aliased to the same value.
use Hash::Abbrev;
my $hash = abbrev qw(file directory count);
say $$hash{f}; # 'file'
say $$hash{dir} # 'directory'
$_ .= '!' for @$hash{qw/f d c/};
say $$hash{file}; # 'file!'
say $$hash{co}; # 'count!'
or as a dispatch table:
@$hash{qw/file dir count/} = (\&load_file, \&read_dir, \&get_count);
$$hash{f}(...) # calls load_file(...)
$$hash{directory}(...) # calls read_dir(...)
INSTALLATION
To install this module, run the following commands:
perl Build.PL
./Build
./Build test
./Build install
SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc Hash::Abbrev
You can also look for information at:
RT, CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Hash-Abbrev
AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/Hash-Abbrev
CPAN Ratings
http://cpanratings.perl.org/d/Hash-Abbrev
Search CPAN
http://search.cpan.org/dist/Hash-Abbrev/
LICENSE AND COPYRIGHT
Copyright (C) 2011 Eric Strom
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.