blib/lib/PLS/Server/Message.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 95.0% 19 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/PLS/Server/Request/Progress.pm ↑ Summary blib/lib/PLS/Server/Request/Window/WorkDoneProgress/Create.pm »
1 package PLS::Server::Message;
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 PLS::JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 PLS::Server::Message
11  
12 =head1 DESCRIPTION
13  
14 This class is the abstract base class for all messages sent between
15 server and client.
16  
17 See L<PLS::Server::Request> and L<PLS::Server::Response>, which
18 inherit from this class.
19  
20 =cut
21  
22 sub serialize
23 38 ▶{
Subroutine serialize: called CC=1 SCAR=0.0
Pod undocumented
24 38 my ($self) = @_;
25  
26 my %content = (
27 jsonrpc => '2.0',
28 38 %{$self}
29 );
30  
31 38 my $json = encode_json \%content;
32 38 return \$json;
33 } ## end sub serialize
34  
35 13 1;
« blib/lib/PLS/Server/Request/Progress.pm ↑ Summary blib/lib/PLS/Server/Request/Window/WorkDoneProgress/Create.pm »