Bug#510144: RFP: libtie-hash-regex-perl -- Match hash keys using Regular Expressions

Andres Mejia mcitadel at gmail.com
Mon Dec 29 18:38:35 UTC 2008


Package: wnpp
Severity: wishlist

Upstream Author : Dave Cross <dave at mag-sol.com>
* URL : http://search.cpan.org/~davecross/Tie-Hash-Regex-1.02/lib/Tie/Hash/Regex.pm
* Tarball: http://search.cpan.org/CPAN/authors/id/D/DA/DAVECROSS/Tie-Hash-Regex-1.02.tar.gz
* License : Same terms as Perl itself
Description : Match hash keys using Regular Expressions
 Here's an example from the synopsis.
  use Tie::Hash::Regex;
  my %h;

  tie %h, 'Tie::Hash::Regex';

  $h{key}   = 'value';
  $h{key2}  = 'another value';
  $h{stuff} = 'something else';

  print $h{key};  # prints 'value'
  print $h{2};    # prints 'another value'
  print $h{'^s'}; # prints 'something else'

  print tied(%h)->FETCH(k); # prints 'value' and 'another value'

  delete $h{k};   # deletes $h{key} and $h{key2};


-- 
Regards,
Andres
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20081229/63dd0fc1/attachment.pgp 


More information about the pkg-perl-maintainers mailing list