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

NAME

Hash::RenameKey - Perl extension for recursively renaming keys according to a regex pattern match

SYNOPSIS

  use Hash::RenameKey;

  my $hr = Hash::RenameKey->new;

  my $old = '-';
  my $new = '_';
  $hr->rename_key(\%hash, $old, $new);

DESCRIPTION

This module provides a single function, rename_key, to recursively rename keys in a hash by applying a regex as follows:

    s/$old/$new/g;

EXPORT

Nothing is exported. This module uses an OO interface.

AUTHOR

Jason Clifford, <jason@ukfsn.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010 by Jason Clifford

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.08 or, at your option, any later version of Perl 5 you may have available.