Re: [code-review] Tie::Hash::RegexKeys

Tony Bowden <[email protected]> Tue, 13 Jan 2004 11:05:51 +0000
Newsgroups gmane.comp.lang.perl.code-review-ladder
Message-ID <[email protected]>
On Mon, Jan 12, 2004 at 06:28:44PM -0800, Peter Scott wrote:
> I've created another module intended for CPAN at
> http://www.psdt.com/Tie-Hash-RegexKeys-0.01.tar.gz pending review from 
> folks here.  This allows you to use regexen as hash keys and operate on 
> the elements with matching keys.  It's not fast when you do that, 'cos 
> it scans through potentially all the keys, but it can be useful 
> anyway.  Looking forward to feedback.

  $h{qr/og$/} = "croak";   # Now birds and frogs both croak

I assume this is meant to be dogs and frogs?


I also suspect you need a much better set of examples. I'm really
struggling to think of any practical use for a module like this...

Tony