If I'm understanding correctly, you're wanting something that can introspect the tests themselves, and make sure that you're asserting on the actual return value of a sub or not. Correct?
I think that may be pretty involved to do, as after some quick thought, you'd need to introspect the test file itself, map a test with the sub in question, and validate whether *all* return paths are asserted against:
# module
sub perform {
my ($x, $y) = @_;
if ($x < 10){
return $x + $y;
}
if ($x == 10){
return $x * $y;
}
return $x - $y;
}
Then:
is perform(5, 5), 10, "...";
is perform(10, 5), 50, "...";
is perform(20, 5), 15, "...";
So it would almost seem as though you'd need to actually write tests against your tests. If there is an existing solution for these types of things, I'd definitely be interested in knowing about it as well.