The above warning is generated by the following code:
use Test::More;
use Test::Deep;
plan tests => 1;
my @data = (
{
name => 'Foo',
},
{
name => undef,
},
);
cmp_deeply \@data, array_each({
name => re('^.*$')
});
If undef is ineed an acceptable value then the test should be written
name => any(undef, re('^.*$')
but when the data we are checking is a lot more complex it is quite hard to find the problematic field and regex.
Would it be possible to make this a test failure? Maybe, in order to keep backward compatibility, depending on some parameter?
e.g. adding return 0 if not defined $got; on line 31 of Text/Deep/Regexp would have helped me.