That grep you gave should work OK.
A possible alternative is to use an END block, and check $? in it to see if you're about to return a successful 0 (and if so clean up). That also has the advantage of catching if you somehow exit early, though it's likely that an early exit is the result of an error anyway, so it wouldn't matter.
(n.b. I haven't tested that the END usage will actually DTRT, but it sounds like it work work)
In reply to Re: Getting test status with Test::More
by fullermd
in thread Getting test status with Test::More
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |