File Coverage

blib/lib/PLS/Server/Request/TextDocument/DidOpen.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 27 28 96.4


line stmt bran cond sub pod time code
1              
2             use strict;
3 9     9   117 use warnings;
  9         64  
  9         309  
4 9     9   117  
  9         67  
  9         308  
5             use parent 'PLS::Server::Request';
6 9     9   45  
  9         66  
  9         59  
7             use PLS::Parser::Document;
8 9     9   513 use PLS::Server::Request::TextDocument::PublishDiagnostics;
  9         19  
  9         225  
9 9     9   93  
  9         40  
  9         1176  
10             =head1 NAME
11              
12             PLS::Server::Request::TextDocument::DidOpen
13              
14             =head1 DESCRIPTION
15              
16             This is a notification from the client to the server that
17             a text document was opened.
18              
19             =cut
20              
21             {
22             my ($self, $server) = @_;
23              
24 2     2 0 8 my $text_document = $self->{params}{textDocument};
25             PLS::Parser::Document->open_file(%{$text_document});
26 2         13  
27 2         4 $server->send_server_request(PLS::Server::Request::TextDocument::PublishDiagnostics->new(uri => $text_document->{uri}));
  2         86  
28              
29 2         90 return;
30             } ## end sub service
31 2         72  
32             1;