| 1 | package Test2::Event::Bail; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | our $VERSION = '1.302073'; | ||
| 6 | |||
| 7 | |||
| 8 | BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } | ||
| 9 | use Test2::Util::HashBase qw{reason}; | ||
| 10 | |||
| 11 | sub callback { | ||
| 12 | my $self = shift; | ||
| 13 | my ($hub) = @_; | ||
| 14 | |||
| 15 | $hub->set_bailed_out($self); | ||
| 16 | } | ||
| 17 | |||
| 18 | # Make sure the tests terminate | ||
| 19 | sub terminate { 255 }; | ||
| 20 | |||
| 21 | sub global { 1 }; | ||
| 22 | |||
| 23 | sub causes_fail { 1 } | ||
| 24 | |||
| 25 | sub summary { | ||
| 26 | my $self = shift; | ||
| 27 | return "Bail out! " . $self->{+REASON} | ||
| 28 | if $self->{+REASON}; | ||
| 29 | |||
| 30 | return "Bail out!"; | ||
| 31 | } | ||
| 32 | |||
| 33 | sub diagnostics { 1 } | ||
| 34 | |||
| 35 | 1; | ||
| 36 | |||
| 37 | __END__ |