line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
9
|
|
|
9
|
|
45
|
use warnings; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
191
|
|
4
|
9
|
|
|
9
|
|
44
|
|
|
9
|
|
|
|
|
10
|
|
|
9
|
|
|
|
|
172
|
|
5
|
|
|
|
|
|
|
use parent 'PLS::Server::Response'; |
6
|
9
|
|
|
9
|
|
35
|
|
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
28
|
|
7
|
|
|
|
|
|
|
use PLS::Parser::Index; |
8
|
9
|
|
|
9
|
|
3412
|
use PLS::Parser::Pod::Package; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
307
|
|
9
|
9
|
|
|
9
|
|
3712
|
use PLS::Parser::Pod::Subroutine; |
|
9
|
|
|
|
|
28
|
|
|
9
|
|
|
|
|
281
|
|
10
|
9
|
|
|
9
|
|
3077
|
use PLS::Parser::Pod::Builtin; |
|
9
|
|
|
|
|
26
|
|
|
9
|
|
|
|
|
283
|
|
11
|
9
|
|
|
9
|
|
46
|
|
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
4320
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
PLS::Server::Response::Resolve |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This is a message from the server to the client with documentation |
19
|
|
|
|
|
|
|
about the currently selected completion item. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
{ |
24
|
|
|
|
|
|
|
my ($class, $request) = @_; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
0
|
|
my $self = {id => $request->{id}, result => undef}; |
27
|
|
|
|
|
|
|
bless $self, $class; |
28
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $index = PLS::Parser::Index->new(); |
30
|
|
|
|
|
|
|
my $kind = $request->{params}{kind}; |
31
|
0
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
if ($kind == 6) |
33
|
|
|
|
|
|
|
{ |
34
|
0
|
0
|
0
|
|
|
|
my $pod = PLS::Parser::Pod::Variable->new(variable => $request->{params}{label}); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $ok = $pod->find(); |
36
|
0
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
if ($ok) |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
0
|
|
|
|
|
$self->{result} = $request->{params}; |
40
|
|
|
|
|
|
|
$self->{result}{documentation} = {kind => 'markdown', value => ${$pod->{markdown}}}; |
41
|
0
|
|
|
|
|
|
} |
42
|
0
|
|
|
|
|
|
} ## end if ($kind == 6) |
|
0
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
elsif ($kind == 7) |
44
|
|
|
|
|
|
|
{ |
45
|
|
|
|
|
|
|
my $pod = PLS::Parser::Pod::Package->new(index => $index, package => $request->{params}{label}); |
46
|
|
|
|
|
|
|
my $ok = $pod->find(); |
47
|
0
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
if ($ok) |
49
|
|
|
|
|
|
|
{ |
50
|
0
|
0
|
|
|
|
|
$self->{result} = $request->{params}; |
51
|
|
|
|
|
|
|
$self->{result}{documentation} = {kind => 'markdown', value => ${$pod->{markdown}}}; |
52
|
0
|
|
|
|
|
|
} |
53
|
0
|
|
|
|
|
|
} ## end elsif ($kind == 7) |
|
0
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
elsif ($kind == 3 or $kind == 21) |
55
|
|
|
|
|
|
|
{ |
56
|
|
|
|
|
|
|
my ($package, $subroutine); |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
if ($request->{params}{label} =~ /->/ or ($request->{params}{sortText} // '') =~ /->/) |
59
|
|
|
|
|
|
|
{ |
60
|
0
|
0
|
0
|
|
|
|
my $label = $request->{params}{label} =~ /->/ ? $request->{params}{label} : $request->{params}{sortText}; |
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
61
|
|
|
|
|
|
|
($package, $subroutine) = split /->/, $label; |
62
|
0
|
0
|
|
|
|
|
$package = [$package]; |
63
|
0
|
|
|
|
|
|
} ## end if ($request->{params}...) |
64
|
0
|
|
|
|
|
|
elsif ($request->{params}{label} =~ /::/ or ($request->{params}{filterText} // '') =~ /::/) |
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
my $label = $request->{params}{label} =~ /::/ ? $request->{params}{label} : $request->{params}{filterText}; |
67
|
|
|
|
|
|
|
my @parts = split /::/, $label; |
68
|
0
|
0
|
|
|
|
|
$subroutine = pop @parts; |
69
|
0
|
|
|
|
|
|
$package = [join '::', @parts]; |
70
|
0
|
|
|
|
|
|
} ## end elsif ($request->{params}...) |
71
|
0
|
|
|
|
|
|
else |
72
|
|
|
|
|
|
|
{ |
73
|
|
|
|
|
|
|
$subroutine = $request->{params}{label}; |
74
|
|
|
|
|
|
|
$package = $request->{params}{data} if (ref $request->{params}{data} eq 'ARRAY'); |
75
|
0
|
|
|
|
|
|
} |
76
|
0
|
0
|
|
|
|
|
|
77
|
|
|
|
|
|
|
my $pod = PLS::Parser::Pod::Subroutine->new(index => $index, packages => $package, subroutine => $subroutine); |
78
|
|
|
|
|
|
|
my $ok = $pod->find(); |
79
|
0
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
if ($ok) |
81
|
|
|
|
|
|
|
{ |
82
|
0
|
0
|
|
|
|
|
$self->{result} = $request->{params}; |
83
|
|
|
|
|
|
|
$self->{result}{documentation} = {kind => 'markdown', value => ${$pod->{markdown}}}; |
84
|
0
|
|
|
|
|
|
} |
85
|
0
|
|
|
|
|
|
} ## end elsif ($kind == 3 or $kind...) |
|
0
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
elsif ($kind == 14) |
87
|
|
|
|
|
|
|
{ |
88
|
|
|
|
|
|
|
my $pod = PLS::Parser::Pod::Builtin->new(function => $request->{params}{label}); |
89
|
|
|
|
|
|
|
my $ok = $pod->find(); |
90
|
0
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
if ($ok) |
92
|
|
|
|
|
|
|
{ |
93
|
0
|
0
|
|
|
|
|
$self->{result} = $request->{params}; |
94
|
|
|
|
|
|
|
$self->{result}{documentation} = {kind => 'markdown', value => ${$pod->{markdown}}}; |
95
|
0
|
|
|
|
|
|
} |
96
|
0
|
|
|
|
|
|
} ## end elsif ($kind == 14) |
|
0
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
return $self; |
99
|
|
|
|
|
|
|
} ## end sub new |
100
|
0
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
1; |