| 1 | package Test2::Event::Bail; | ||||||||||
| 2 | 455 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 455 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 455 | our $VERSION = '1.302226'; | |||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | 455 | ▶ | BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 455 | ▶ | use Test2::Util::HashBase qw{reason buffered}; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | # Make sure the tests terminate | ||||||||||
| 12 | 1 | ▶ | sub terminate { 255 }; | ||||||||
|
Subroutine
terminate: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 13 | |||||||||||
| 14 | 2 | ▶ | sub global { 1 }; | ||||||||
|
Subroutine
global: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 15 | |||||||||||
| 16 | 1 | ▶ | sub causes_fail { 1 } | ||||||||
|
Subroutine
causes_fail: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 17 | |||||||||||
| 18 | 2 | ▶ | sub summary { | ||||||||
|
Subroutine
summary: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 19 | 2 | my $self = shift; | |||||||||
| 20 | return "Bail out! " . $self->{+REASON} | ||||||||||
| 21 | 2 | ▶ | if $self->{+REASON}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | 1 | return "Bail out!"; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 1 | ▶ | sub diagnostics { 1 } | ||||||||
|
Subroutine
diagnostics: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 27 | |||||||||||
| 28 | 41 | ▶ | sub facet_data { | ||||||||
|
Subroutine
facet_data: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 29 | 41 | my $self = shift; | |||||||||
| 30 | 41 | my $out = $self->common_facet_data; | |||||||||
| 31 | |||||||||||
| 32 | $out->{control} = { | ||||||||||
| 33 | global => 1, | ||||||||||
| 34 | halt => 1, | ||||||||||
| 35 | 41 | details => $self->{+REASON}, | |||||||||
| 36 | terminate => 255, | ||||||||||
| 37 | }; | ||||||||||
| 38 | |||||||||||
| 39 | 41 | return $out; | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 455 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||