Does anyone know of a quick and dirty way to get the status of your tests in Test::More? The documentation suggests $Test::More::status, but remarks that this is "unimplemented". The reason I'm asking is in order to test I need to setup a number of files/database/blah objects, and then cleanup when done. I was hoping to leave around the test data if one or more of the tests failed -- for debugging purposes.
The best I came up with so far was:
END {
my $tb = Test::More->builder;
if ( !grep { !$_ } $tb->summary() ) {
# do cleanup
}
}