Agent/Subagent.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 33 / 33 CC 3 SCAR 5.1
CC
3
Cov
100%
to_hash
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« Agent/Message/StreamEvent.pm ↑ Summary Agent/Permission/Result/Allow.pm »
1 package Claude::Agent::Subagent;
2  
3 5 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use Object::Proto ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use Claude::Agent::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 5 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
11 5 Object::Proto::define('Claude::Agent::Subagent',
12 'description:Str:required',
13 'prompt:Str:required',
14 'tools:StrList:predicate',
15 'model:Str:predicate',
16 );
17 }
18  
19 9 ▶sub to_hash {
Subroutine to_hash: called CC=3 SCAR=11.0
Pod documented
20 9 my ($self) = @_;
21  
22 9 my $hash = {
23 description => $self->description,
24 prompt => $self->prompt,
25 };
26  
27 9 ▶ $hash->{tools} = $self->tools if $self->has_tools;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_tools 5 4 9
28 9 ▶ $hash->{model} = $self->model if $self->has_model;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_model 3 6 9
29  
30 9 return $hash;
31 }
32  
33  
34 5 1;
35  
36 __END__
« Agent/Message/StreamEvent.pm ↑ Summary Agent/Permission/Result/Allow.pm »