The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SHARYANTO::Hash::Util - Hash utilities

VERSION

This document describes version 0.75 of SHARYANTO::Hash::Util (from Perl distribution SHARYANTO-Utils), released on 2014-06-26.

SYNOPSIS

 use SHARYANTO::Hash::Util qw(rename_key);
 my %h = (a=>1, b=>2);
 rename_key(\%h, "a", "alpha"); # %h = (alpha=>1, b=>2)

FUNCTIONS

rename_key(\%hash, $old_key, $new_key)

Rename key. This is basically $hash{$new_key} = delete $hash{$old_key} with a couple of additional checks. It is a shortcut for:

 die unless exists $hash{$old_key};
 die if     exists $hash{$new_key};
 $hash{$new_key} = delete $hash{$old_key};

SEE ALSO

SHARYANTO

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/SHARYANTO-Utils.

SOURCE

Source repository is at https://github.com/sharyanto/perl-SHARYANTO-Utils.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=SHARYANTO-Utils

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.