Subject: | ok(defined $foo) broked? |
I've got a very weird circumstance happening in my unit tests
=begin testing
my $test_result = $object->method_that_returns_undef();
ok(defined $test_result, "This shouldn't pass, but it does!");
=end testing
=cut
sub method_that_returns_undef {
return undef;
}
Why does this happen, and how do I make it stop? 8^)
Seriously, though - I suspect it's a bug. I came across it while I was
trying to determine whether a hashref was getting populated or not.