I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-03-03 21:20:32-08 by random
Defining optional hash keys
Is there any possibility to define an optional hash-key for comparison? I though about something like:
$data_expect = { name => 'tester', data => ignore(), records => 0, ignore('husband') => 'joey' };
Here data can be of any type, but the hash key must exists, whereas for the haskey husband it is allowed to be non-existing at all, but if it exists it must still match 'joey' (ignore could be used to ignore that too). Of course that would require that comparisions would check the hashkeys, not the values. Any thoughts on that?
Direct Responses: 7257 | Write a response