File Coverage

blib/lib/PLS/Server/Method/CompletionItem.pm
Criterion Covered Total %
statement 9 14 64.2
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 21 57.1


line stmt bran cond sub pod time code
1             package PLS::Server::Method::CompletionItem;
2              
3 11     11   174 use strict;
  11         30  
  11         456  
4 11     11   58 use warnings;
  11         22  
  11         549  
5              
6 11     11   6350 use PLS::Server::Request::CompletionItem::Resolve;
  11         259  
  11         1779  
7              
8             =head1 NAME
9              
10             PLS::Server::Method::CompletionItem
11              
12             =head1 DESCRIPTION
13              
14             This module redirects requests beginning with C<completionItem/> to the
15             appropriate subclass of L<PLS::Server::Request>.
16              
17             Requests currently implemented:
18              
19             =over
20              
21             =item completionItem/resolve - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#completionItem_resolve>
22              
23             L<PLS::Server::Request::CompletionItem::Resolve>
24              
25             =back
26              
27             =cut
28              
29             sub get_request
30             {
31 0     0 0   my ($request) = @_;
32              
33 0           my (undef, $method) = split m{/}, $request->{method};
34              
35 0 0         if ($method eq 'resolve')
36             {
37 0           return PLS::Server::Request::CompletionItem::Resolve->new($request);
38             }
39              
40 0           return;
41             } ## end sub get_request
42              
43             1;