Test-Deep - Re: Defining optional hash keys

Posted on Thu Mar 6 00:22:09 2008 by random in response to 7257 (See the whole thread of 4)
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