| 1 | package Logic::Relational::TraceEvent; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use v5.38; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use experimental 'signatures'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use Carp qw(croak); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | =head1 NAME | ||||||||||||
| 8 | |||||||||||||
| 9 | Logic::Relational::TraceEvent - Event dispatched during query execution tracing. | ||||||||||||
| 10 | |||||||||||||
| 11 | =head1 SYNOPSIS | ||||||||||||
| 12 | |||||||||||||
| 13 | my $event = Logic::Relational::TraceEvent->new( | ||||||||||||
| 14 | type => 'call', | ||||||||||||
| 15 | goal => $goal, | ||||||||||||
| 16 | substitution => $subst | ||||||||||||
| 17 | ); | ||||||||||||
| 18 | |||||||||||||
| 19 | =cut | ||||||||||||
| 20 | |||||||||||||
| 21 | 29 | ▶ | sub new ( $class, %args ) { | ||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||
| 22 | 29 | ▶ | my $type = $args{type} // croak "type is required"; | ||||||||||
|
Condition50%1/2
$args{"type"} // croak("type is required")
MC/DC0%0/1
$args{"type"} // croak("type is required")
$args{"type"}
Truth table50%1/2
A
A= $args{"type"}
| |||||||||||||
| 23 | 29 | my $goal = $args{goal}; | |||||||||||
| 24 | 29 | ▶ | my $subst = $args{substitution} // croak "substitution is required"; | ||||||||||
|
Condition50%1/2
$args{"substitution"} // croak("substitution is required")
MC/DC0%0/1
$args{"substitution"} // croak("substitution is required")
$args{"substitution"}
Truth table50%1/2
A
A= $args{"substitution"}
| |||||||||||||
| 25 | |||||||||||||
| 26 | 29 | return bless { | |||||||||||
| 27 | type => $type, | ||||||||||||
| 28 | goal => $goal, | ||||||||||||
| 29 | substitution => $subst | ||||||||||||
| 30 | }, $class; | ||||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 29 | ▶ | sub type ($self) { | ||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 34 | 29 | return $self->{type}; | |||||||||||
| 35 | } | ||||||||||||
| 36 | |||||||||||||
| 37 | 0 | ▶ | sub goal ($self) { | ||||||||||
|
Subroutine
goal: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 38 | 0 | return $self->{goal}; | |||||||||||
| 39 | } | ||||||||||||
| 40 | |||||||||||||
| 41 | 0 | ▶ | sub substitution ($self) { | ||||||||||
|
Subroutine
substitution: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 42 | 0 | return $self->{substitution}; | |||||||||||
| 43 | } | ||||||||||||
| 44 | |||||||||||||
| 45 | 1 | 1; | |||||||||||