Skip to content

Commit

Permalink
Test::Builder->BAIL_OUT issues an abort event.
Browse files Browse the repository at this point in the history
Removes $tb->{Bailed_Out}

For Test-More#101
  • Loading branch information
schwern committed Nov 15, 2011
1 parent b26a5b1 commit 817c12b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Test/Builder.pm
Expand Up @@ -1159,8 +1159,10 @@ It will exit with 255.
sub BAIL_OUT {
my( $self, $reason ) = @_;

$self->{Bailed_Out} = 1;
$self->_print("Bail out! $reason");
$self->test_state->post_event(
Test::Builder2::Event::Abort->new( reason => $reason )
);

exit 255;
}

Expand Down

0 comments on commit 817c12b

Please sign in to comment.