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 2009-04-16 20:49:58-07 by fergal in response to 10494
Re: Inverted set comparisons

I'm not sure which you mean. Is it something like

cmp_deeply($array, doesnt_contain([1, 3, 5])

? If so then no it's not provided.

You can write custom comparators easily enough. Have a look at lib/Test/Deep/Boolean.pm for a simple example.

If on the other hand you mean something like

cmp_deeply($thing, not_any_of($thing1, $thing2, $thing3))

then it's also not provided but could be done easily enough if there was an Not() comparator:

cmp_deeply($thing, Not(any($thing1, $thing2, $thing3)))

sadly there is no Not comparator. You could write one easily, if you do, let me know and I'll ship it built-in as it's a generally useful thing to have.

Direct Responses: Write a response