The replies to How to test exit? might help you.
In reply to Re: Use die() instead of exit() in Test::More by kyle in thread Use die() instead of exit() in Test::More by Tobiwan