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-05 22:22:09-08 by random in response to 7257
Re: Defining optional hash keys
I deployed your proposed workaround and it works great so far (performance is not a real issue for testing in my case. I'm using this sub (typos corrected):
sub opthash { my ($must_have, $can_have) = @_; return all(superhashof($must_have), subhashof({ %$must_have, %$can_have }) ); }
Would it make sense to add this to Test::Deep directly and add the pod for it stating that it is not optimized and should not be used on large hashes where performance is mandatory? Cheers
Direct Responses: 7291 | Write a response