| 1 | package PLS::Server; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 13 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 13 | ▶ | use Future; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 13 | ▶ | use Future::Queue; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 13 | ▶ | use Future::Utils; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 13 | ▶ | use IO::Async::Loop; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 13 | ▶ | use IO::Async::Signal; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 13 | ▶ | use IO::Async::Stream; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | 13 | ▶ | use IO::Handle; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | 13 | ▶ | use Scalar::Util qw(blessed); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 13 | ▶ | use PLS::JSON; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 13 | ▶ | use PLS::Server::Request::Factory; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | 13 | ▶ | use PLS::Server::Response; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | 13 | ▶ | use PLS::Server::Response::Cancelled; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | =head1 NAME | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | PLS::Server | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | Perl Language Server | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | This server communicates to a language client through STDIN/STDOUT. | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | my $server = PLS::Server->new(); | ||||||||||||||||||||||||||||
| 33 | my $exit_code = $server->run(); | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | exit $exit_code; | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | =cut | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | sub new | ||||||||||||||||||||||||||||
| 40 | 7 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 41 | 7 | my ($class) = @_; | |||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | return | ||||||||||||||||||||||||||||
| 44 | 7 | bless { | |||||||||||||||||||||||||||
| 45 | loop => IO::Async::Loop->new(), | ||||||||||||||||||||||||||||
| 46 | stream => undef, | ||||||||||||||||||||||||||||
| 47 | running_futures => {}, | ||||||||||||||||||||||||||||
| 48 | pending_requests => {} | ||||||||||||||||||||||||||||
| 49 | }, $class; | ||||||||||||||||||||||||||||
| 50 | } ## end sub new | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | sub run | ||||||||||||||||||||||||||||
| 53 | 7 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
run: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 54 | 7 | my ($self) = @_; | |||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | $self->{stream} = IO::Async::Stream->new_for_stdio( | ||||||||||||||||||||||||||||
| 57 | autoflush => 0, | ||||||||||||||||||||||||||||
| 58 | 7 | ▶ | on_read => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 59 | 7 | my $size = 0; | |||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | 24 | ▶ | return sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=6 SCAR=18.2
| |||||||||||||||||||||||||||||
| 62 | 24 | my ($stream, $buffref, $eof) = @_; | |||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | 24 | ▶ | exit if $eof; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | 24 | ▶ | if (not $size) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 67 | { | ||||||||||||||||||||||||||||
| 68 | 24 | ▶ | if (${$buffref} =~ s/^(.*?)\r\n\r\n//s) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 69 | { | ||||||||||||||||||||||||||||
| 70 | 24 | my $headers = $1; | |||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 24 | my %headers = map { split /: / } grep { length } split /\r\n/, $headers; | |||||||||||||||||||||||||||
| 73 | 24 | $size = $headers{'Content-Length'}; | |||||||||||||||||||||||||||
| 74 | 24 | ▶ | die 'no Content-Length header provided' unless $size; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 75 | } ## end if (${$buffref} =~ s/^(.*?)\r\n\r\n//s...) | ||||||||||||||||||||||||||||
| 76 | else | ||||||||||||||||||||||||||||
| 77 | { | ||||||||||||||||||||||||||||
| 78 | 0 | return 0; | |||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||
| 80 | } ## end if (not $size) | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 23 | ▶ | return 0 if (length(${$buffref}) < $size); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | 23 | my $json = substr ${$buffref}, 0, $size, ''; | |||||||||||||||||||||||||||
| 85 | 23 | $size = 0; | |||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | 23 | my $content = decode_json $json; | |||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||
| 89 | 23 | $self->handle_client_message($content); | |||||||||||||||||||||||||||
| 90 | 23 | return 1; | |||||||||||||||||||||||||||
| 91 | 7 | }; | |||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||
| 93 | 7 | ); | |||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | 7 | $self->{loop}->add($self->{stream}); | |||||||||||||||||||||||||||
| 96 | $self->{loop}->add( | ||||||||||||||||||||||||||||
| 97 | IO::Async::Signal->new(name => 'TERM', | ||||||||||||||||||||||||||||
| 98 | 4 | ▶ | on_receipt => sub { $self->stop(0) }) | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 99 | 7 | ▶ | ) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 100 | if ($^O ne 'MSWin32'); | ||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | 7 | my $exit_code = $self->{loop}->run(); | |||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||
| 104 | 6 | ▶ | return (length $exit_code) ? $exit_code : 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 105 | } ## end sub run | ||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | sub handle_client_message | ||||||||||||||||||||||||||||
| 108 | 23 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
handle_client_message: called CC=7 SCAR=19.5
Pod
undocumented
| |||||||||||||||||||||||||||||
| 109 | 23 | my ($self, $message) = @_; | |||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | 23 | ▶ | if (length $message->{method}) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 112 | { | ||||||||||||||||||||||||||||
| 113 | 19 | $message = PLS::Server::Request::Factory->new($message); | |||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||
| 115 | 19 | ▶ | if (blessed($message) and $message->isa('PLS::Server::Response')) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
builtin::blessed($message) and $message->isa("PLS::Server::Response")
MC/DC50%1/2
builtin::blessed($message) and $message->isa("PLS::Server::Response")
builtin::blessed($message)
$message->isa("PLS::Server::Response")
Truth table66%2/3
A and B
A= builtin::blessed($message)B= $message->isa("PLS::Server::Response")
| |||||||||||||||||||||||||||||
| 116 | { | ||||||||||||||||||||||||||||
| 117 | 2 | $self->send_message($message); | |||||||||||||||||||||||||||
| 118 | 2 | return; | |||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||
| 120 | } ## end if (length $message->{...}) | ||||||||||||||||||||||||||||
| 121 | else | ||||||||||||||||||||||||||||
| 122 | { | ||||||||||||||||||||||||||||
| 123 | 4 | $message = PLS::Server::Response->new($message); | |||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||
| 126 | 21 | ▶ | return unless blessed($message); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | 21 | ▶ | if ($message->isa('PLS::Server::Request')) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 129 | { | ||||||||||||||||||||||||||||
| 130 | 17 | $self->handle_client_request($message); | |||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||
| 132 | 21 | ▶ | if ($message->isa('PLS::Server::Response')) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 133 | { | ||||||||||||||||||||||||||||
| 134 | 4 | $self->handle_client_response($message); | |||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | 21 | return; | |||||||||||||||||||||||||||
| 138 | } ## end sub handle_client_message | ||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||
| 140 | sub send_server_request | ||||||||||||||||||||||||||||
| 141 | 30 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
send_server_request: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 142 | 30 | my ($self, $request) = @_; | |||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | 30 | ▶ | return unless blessed($request); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||
| 146 | 30 | ▶ | if ($request->isa('PLS::Server::Request')) | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 147 | { | ||||||||||||||||||||||||||||
| 148 | 28 | $self->handle_server_request($request); | |||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||
| 150 | elsif ($request->isa('Future')) | ||||||||||||||||||||||||||||
| 151 | { | ||||||||||||||||||||||||||||
| 152 | $request->on_done( | ||||||||||||||||||||||||||||
| 153 | 1 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 154 | 1 | my ($request) = @_; | |||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | 1 | $self->handle_server_request($request); | |||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||
| 158 | 2 | )->retain(); | |||||||||||||||||||||||||||
| 159 | } ## end elsif ($request->isa('Future'...)) | ||||||||||||||||||||||||||||
| 160 | 30 | return; | |||||||||||||||||||||||||||
| 161 | } ## end sub send_server_request | ||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||
| 163 | sub send_message | ||||||||||||||||||||||||||||
| 164 | 38 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
send_message: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||||||||||
| 165 | 38 | my ($self, $message) = @_; | |||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||
| 167 | 38 | ▶ | return if (not blessed($message) or not $message->isa('PLS::Server::Message')); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($message) and $message->isa("PLS::Server::Message")
MC/DC0%0/2
builtin::blessed($message) and $message->isa("PLS::Server::Message")
builtin::blessed($message)
$message->isa("PLS::Server::Message")
Truth table33%1/3
A and B
A= builtin::blessed($message)B= $message->isa("PLS::Server::Message")
| |||||||||||||||||||||||||||||
| 168 | 38 | my $json = $message->serialize(); | |||||||||||||||||||||||||||
| 169 | 38 | my $length = length ${$json}; | |||||||||||||||||||||||||||
| 170 | 38 | $self->{stream}->write("Content-Length: $length\r\n\r\n$$json")->retain(); | |||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||
| 172 | 38 | return; | |||||||||||||||||||||||||||
| 173 | } ## end sub send_message | ||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||
| 175 | sub handle_client_request | ||||||||||||||||||||||||||||
| 176 | 17 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
handle_client_request: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 177 | 17 | my ($self, $request) = @_; | |||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | 17 | my $response = $request->service($self); | |||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | 17 | ▶ | if (blessed($response)) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 182 | { | ||||||||||||||||||||||||||||
| 183 | 7 | ▶ | if ($response->isa('PLS::Server::Response')) | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 184 | { | ||||||||||||||||||||||||||||
| 185 | 6 | $self->send_message($response); | |||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||
| 187 | elsif ($response->isa('Future')) | ||||||||||||||||||||||||||||
| 188 | { | ||||||||||||||||||||||||||||
| 189 | 1 | ▶ | $self->{running_futures}{$request->{id}} = $response if (length $request->{id}); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||
| 191 | $response->on_done( | ||||||||||||||||||||||||||||
| 192 | 0 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 193 | 0 | my ($response) = @_; | |||||||||||||||||||||||||||
| 194 | 0 | $self->send_message($response); | |||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||
| 196 | )->on_cancel( | ||||||||||||||||||||||||||||
| 197 | 1 | ▶ | sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 198 | 1 | $self->send_message(PLS::Server::Response::Cancelled->new(id => $request->{id})); | |||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||
| 200 | 1 | ); | |||||||||||||||||||||||||||
| 201 | } ## end elsif ($response->isa('Future'...)) | ||||||||||||||||||||||||||||
| 202 | } ## end if (blessed($response)...) | ||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||
| 204 | 17 | return; | |||||||||||||||||||||||||||
| 205 | } ## end sub handle_client_request | ||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | sub handle_client_response | ||||||||||||||||||||||||||||
| 208 | 4 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
handle_client_response: called CC=3 SCAR=11.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 209 | 4 | my ($self, $response) = @_; | |||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||
| 211 | 4 | my $request = $self->{pending_requests}{$response->{id}}; | |||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||
| 213 | 4 | ▶ | if (blessed($request) and $request->isa('PLS::Server::Request')) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($request) and $request->isa("PLS::Server::Request")
MC/DC0%0/2
builtin::blessed($request) and $request->isa("PLS::Server::Request")
builtin::blessed($request)
$request->isa("PLS::Server::Request")
Truth table33%1/3
A and B
A= builtin::blessed($request)B= $request->isa("PLS::Server::Request")
| |||||||||||||||||||||||||||||
| 214 | { | ||||||||||||||||||||||||||||
| 215 | 4 | $request->handle_response($response, $self); | |||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||
| 218 | 4 | return; | |||||||||||||||||||||||||||
| 219 | } ## end sub handle_client_response | ||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||
| 221 | sub handle_server_request | ||||||||||||||||||||||||||||
| 222 | 29 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
handle_server_request: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 223 | 29 | my ($self, $request) = @_; | |||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||
| 225 | 29 | ▶ | if ($request->{notification}) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 226 | { | ||||||||||||||||||||||||||||
| 227 | 14 | delete $request->{notification}; | |||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||
| 229 | else | ||||||||||||||||||||||||||||
| 230 | { | ||||||||||||||||||||||||||||
| 231 | 15 | $request->{id} = ++$self->{last_request_id}; | |||||||||||||||||||||||||||
| 232 | 15 | $self->{pending_requests}{$request->{id}} = $request; | |||||||||||||||||||||||||||
| 233 | } | ||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||
| 235 | 29 | ▶ | delete $self->{running_futures}{$request->{id}} if (length $request->{id}); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 236 | 29 | $self->send_message($request); | |||||||||||||||||||||||||||
| 237 | 29 | return; | |||||||||||||||||||||||||||
| 238 | } ## end sub handle_server_request | ||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||
| 240 | sub handle_server_response | ||||||||||||||||||||||||||||
| 241 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
handle_server_response: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 242 | 0 | my ($self, $response) = @_; | |||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||
| 244 | 0 | $self->send_message($response); | |||||||||||||||||||||||||||
| 245 | 0 | return; | |||||||||||||||||||||||||||
| 246 | } ## end sub handle_server_response | ||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||
| 248 | sub stop | ||||||||||||||||||||||||||||
| 249 | 6 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
stop: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 250 | 6 | my ($self, $exit_code) = @_; | |||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||
| 252 | 6 | $self->{loop}->stop($exit_code); | |||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||
| 254 | 6 | return; | |||||||||||||||||||||||||||
| 255 | } ## end sub stop | ||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||
| 257 | 13 | 1; | |||||||||||||||||||||||||||