sub bail-out

Table of Contents

If you already know the tests will fail, you can bail out of the test run using bail-out():

my$has-db-connection;

...

$has-db-connectionorbail-out'Must have database connection for testing';

The function aborts the current test run, signaling failure to the harness. Takes an optional reason for bailing out. The subroutine will call exit(), so if you need to do a clean-up, do it before calling bail-out().