| Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/Test2/Event/Bail.pm |
| Statements | Executed 10 statements in 175µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 10µs | 12µs | Test2::Event::Bail::BEGIN@2 |
| 1 | 1 | 1 | 6µs | 6µs | Test2::Event::Bail::BEGIN@8 |
| 1 | 1 | 1 | 4µs | 52µs | Test2::Event::Bail::BEGIN@9 |
| 1 | 1 | 1 | 3µs | 20µs | Test2::Event::Bail::BEGIN@3 |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Bail::causes_fail |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Bail::diagnostics |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Bail::facet_data |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Bail::global |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Bail::summary |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Bail::terminate |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Test2::Event::Bail; | ||||
| 2 | 2 | 18µs | 2 | 13µs | # spent 12µs (10+2) within Test2::Event::Bail::BEGIN@2 which was called:
# once (10µs+2µs) by Test2::API::BEGIN@96 at line 2 # spent 12µs making 1 call to Test2::Event::Bail::BEGIN@2
# spent 2µs making 1 call to strict::import |
| 3 | 2 | 35µs | 2 | 37µs | # spent 20µs (3+17) within Test2::Event::Bail::BEGIN@3 which was called:
# once (3µs+17µs) by Test2::API::BEGIN@96 at line 3 # spent 20µs making 1 call to Test2::Event::Bail::BEGIN@3
# spent 17µs making 1 call to warnings::import |
| 4 | |||||
| 5 | 1 | 300ns | our $VERSION = '1.302198'; | ||
| 6 | |||||
| 7 | |||||
| 8 | 2 | 21µs | 1 | 6µs | # spent 6µs within Test2::Event::Bail::BEGIN@8 which was called:
# once (6µs+0s) by Test2::API::BEGIN@96 at line 8 # spent 6µs making 1 call to Test2::Event::Bail::BEGIN@8 |
| 9 | 2 | 98µs | 2 | 100µs | # spent 52µs (4+48) within Test2::Event::Bail::BEGIN@9 which was called:
# once (4µs+48µs) by Test2::API::BEGIN@96 at line 9 # spent 52µs making 1 call to Test2::Event::Bail::BEGIN@9
# spent 48µs making 1 call to Test2::Util::HashBase::import |
| 10 | |||||
| 11 | # Make sure the tests terminate | ||||
| 12 | sub terminate { 255 }; | ||||
| 13 | |||||
| 14 | sub global { 1 }; | ||||
| 15 | |||||
| 16 | sub causes_fail { 1 } | ||||
| 17 | |||||
| 18 | sub summary { | ||||
| 19 | my $self = shift; | ||||
| 20 | return "Bail out! " . $self->{+REASON} | ||||
| 21 | if $self->{+REASON}; | ||||
| 22 | |||||
| 23 | return "Bail out!"; | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | sub diagnostics { 1 } | ||||
| 27 | |||||
| 28 | sub facet_data { | ||||
| 29 | my $self = shift; | ||||
| 30 | my $out = $self->common_facet_data; | ||||
| 31 | |||||
| 32 | $out->{control} = { | ||||
| 33 | global => 1, | ||||
| 34 | halt => 1, | ||||
| 35 | details => $self->{+REASON}, | ||||
| 36 | terminate => 255, | ||||
| 37 | }; | ||||
| 38 | |||||
| 39 | return $out; | ||||
| 40 | } | ||||
| 41 | |||||
| 42 | 1 | 2µs | 1; | ||
| 43 | |||||
| 44 | __END__ |