| 1 | package Claude::Agent::Message::StreamEvent; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 11 | ▶ | use 5.020; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 11 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 11 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 11 | ▶ | use Object::Proto (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 11 | ▶ | use Claude::Agent::Message::Base; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 11 | ▶ | BEGIN { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 11 | Object::Proto::define('Claude::Agent::Message::StreamEvent', | |||||||||||||||||||||||||||
| 12 | extends => 'Claude::Agent::Message::Base', | ||||||||||||||||||||||||||||
| 13 | 'event:HashRef:required', | ||||||||||||||||||||||||||||
| 14 | ); | ||||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | sub event_type { | ||||||||||||||||||||||||||
|
Subroutine
event_type: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 18 | 1 | my ($self) = @_; | |||||||||||||||||||||||||||
| 19 | 1 | return $self->event->{type}; | |||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | sub delta { | ||||||||||||||||||||||||||
|
Subroutine
delta: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 23 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 24 | 0 | return $self->event->{delta}; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 2 | ▶ | sub text_delta { | ||||||||||||||||||||||||||
|
Subroutine
text_delta: called CC=4 SCAR=14.5
Pod
documented
| |||||||||||||||||||||||||||||
| 28 | 2 | my ($self) = @_; | |||||||||||||||||||||||||||
| 29 | 2 | my $delta = $self->event->{delta}; | |||||||||||||||||||||||||||
| 30 | 2 | ▶ | return unless ref $delta eq 'HASH'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 1 | ▶ | return unless defined $delta->{type} && $delta->{type} eq 'text_delta'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $delta->{"type"} and $delta->{"type"} eq "text_delta"
MC/DC0%0/2
defined $delta->{"type"} and $delta->{"type"} eq "text_delta"
defined $delta->{"type"}
$delta->{"type"} eq "text_delta"
Truth table33%1/3
A and B
A= defined $delta->{"type"}B= $delta->{"type"} eq "text_delta"
| |||||||||||||||||||||||||||||
| 32 | 1 | return $delta->{text}; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 11 | 1; | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||||||||||