Jason Clifford > Hash-RenameKey-0.02 > Hash::RenameKey

Download:
Hash-RenameKey-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

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.

syntax highlighting: