When running a test script sometimes we reach a failure that is so problematic you cannot go on testing. This can be in the scope of a single test script in which case you would call exit() to abort the current test script or it can be so bad that all the testing should stop. In that case you should call BAIL_OUT(). That will indicate the harness that it should not call any other test script.

examples/perl/t/exit.t
use strict;
use warnings;

use Test::More tests => 3;

ok(1, "first");
ok(0, "second") or exit;
ok(1, "third");

perl examples/perl/t/exit.t

1..3
ok 1 - first
not ok 2 - second
#   Failed test 'second'
#   at examples/perl/t/exit.t line 7.
# Looks like you planned 3 tests but ran 2.
# Looks like you failed 1 test of 2 run.

prove examples/perl/t/exit.t

perl/t/exit.t .. 1/3 
#   Failed test 'second'
#   at perl/t/exit.t line 7.
# Looks like you planned 3 tests but ran 2.
# Looks like you failed 1 test of 2 run.
perl/t/exit.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 2/3 subtests 

Test Summary Report
-------------------
perl/t/exit.t (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 3 tests but ran 2.
Files=1, Tests=2,  0 wallclock secs
    ( 0.03 usr  0.01 sys +  0.02 cusr  0.00 csys =  0.06 CPU)
Result: FAIL
Failed 1/1 test programs. 1/2 subtests failed.