| 1 | 2 | ▶ | use v5.20.0; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | package JMAP::Tester::Abort 0.113; | ||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | extends 'Throwable::Error'; | |||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use experimental 'signatures'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use namespace::clean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 2 | ▶ | use Sub::Exporter -setup => { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | exports => { | ||||||||||||||||||||||||||||
| 13 | 5 | ▶ | abort => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | 5 | my $pkg = shift; | |||||||||||||||||||||||||||
| 15 | 8 | ▶ | return sub (@args) { die $pkg->new(@args) } | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 5 | } | |||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | 2 | }; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 42 | ▶ | around BUILDARGS => sub ($orig, $self, @args) { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.1
| |||||||||||||||||||||||||||||
| 21 | 42 | ▶ | return { message => $args[0] } if @args == 1 && ! ref $args[0]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@args == 1 and not ref $args[0]
MC/DC50%1/2
@args == 1 and not ref $args[0]
@args == 1
not ref $args[0]
Truth table66%2/3
A and not(B)
A= @args == 1B= not ref $args[0]
| |||||||||||||||||||||||||||||
| 22 | 32 | return $self->$orig(@args); | |||||||||||||||||||||||||||
| 23 | 2 | }; | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 2 | has message => ( | |||||||||||||||||||||||||||
| 26 | is => 'ro', | ||||||||||||||||||||||||||||
| 27 | required => 1, | ||||||||||||||||||||||||||||
| 28 | ); | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 2 | has diagnostics => ( | |||||||||||||||||||||||||||
| 31 | is => 'ro', | ||||||||||||||||||||||||||||
| 32 | ); | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 2 | ▶ | sub as_test_abort_events ($self) { | ||||||||||||||||||||||||||
|
Subroutine
as_test_abort_events: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 35 | return [ | ||||||||||||||||||||||||||||
| 36 | [ Ok => (pass => 0, name => $self->message) ], | ||||||||||||||||||||||||||||
| 37 | ($self->diagnostics | ||||||||||||||||||||||||||||
| 38 | 2 | ▶ | ? (map {; [ Diag => (message => $_) ] } @{ $self->diagnostics }) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 39 | : ()), | ||||||||||||||||||||||||||||
| 40 | ]; | ||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 2 | 1; | |||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | __END__ | ||||||||||||||||||||||||||||