Agent/MCP/SSEServer.pm

filter: Statementstmt 100% 25 / 25 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 75.0% 3 / 4 totaltotal 97.5% 40 / 41 CC 2 SCAR 1.7
CC
2
Cov
100%
BUILD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Agent/MCP/HTTPServer.pm ↑ Summary Agent/Permission/Result.pm »
1 package Claude::Agent::MCP::SSEServer;
2  
3 8 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 8 ▶use Object::Proto ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 8 ▶use Claude::Agent::MCP::HeaderUtils ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 8 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
11 8 Object::Proto::define('Claude::Agent::MCP::SSEServer',
12 'url:Str:required',
13 'headers:HashRef:default({})',
14 'sensitive_headers:ArrayRef:default([])',
15 'type:Str:readonly:default(sse)',
16 );
17 }
18  
19 4 ▶sub BUILD {
Subroutine BUILD: called CC=2 SCAR=6.9
Pod undocumented
20 4 my ($self) = @_;
21 4 ▶ die "URL must use http or https scheme"
Branch: 1 branch
BranchTrueFalseTotal
unless $self->url =~ m[^https?://]iu 1 3 4
22 unless $self->url =~ m{^https?://}i;
23 3 return;
24 }
25  
26 7 ▶sub is_sensitive_header {
Subroutine is_sensitive_header: called CC=1 SCAR=0.0
Pod documented
27 7 my ($self, $header_name) = @_;
28 7 return Claude::Agent::MCP::HeaderUtils::is_sensitive_header(
29 $header_name, $self->sensitive_headers
30 );
31 }
32  
33 1 ▶sub redacted_headers {
Subroutine redacted_headers: called CC=1 SCAR=0.0
Pod documented
34 1 my ($self) = @_;
35 1 return Claude::Agent::MCP::HeaderUtils::redacted_headers(
36 $self->headers, $self->sensitive_headers
37 );
38 }
39  
40 3 ▶sub to_hash {
Subroutine to_hash: called CC=1 SCAR=0.0
Pod documented
41 3 my ($self) = @_;
42 return {
43 3 type => 'sse',
44 url => $self->url,
45 headers => $self->headers,
46 };
47 }
48  
49 8 1;
50  
51 __END__
« Agent/MCP/HTTPServer.pm ↑ Summary Agent/Permission/Result.pm »