line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Devel::PerlySense::Editor::Vim - Integration with Vim |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 DESCRIPTION |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=cut |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
1115
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
15
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
16
|
1
|
|
|
1
|
|
3
|
use utf8; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
5
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package Devel::PerlySense::Editor::Vim; |
19
|
|
|
|
|
|
|
$Devel::PerlySense::Editor::Vim::VERSION = '0.0217'; |
20
|
1
|
|
|
1
|
|
35
|
use base "Devel::PerlySense::Editor"; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
4
|
use Spiffy -Base; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
27
|
1
|
|
|
1
|
|
513
|
use Data::Dumper; |
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
1
|
|
23
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
28
|
1
|
|
|
1
|
|
3
|
use File::Basename; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
29
|
1
|
|
|
1
|
|
3
|
use Graph::Easy; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
13
|
|
30
|
1
|
|
|
1
|
|
3
|
use Text::Table; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
31
|
1
|
|
|
1
|
|
3
|
use List::Util qw/ max first /; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
32
|
1
|
|
|
1
|
|
3
|
use POSIX qw/ ceil /; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
33
|
1
|
|
|
1
|
|
39
|
use Path::Class; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
1
|
|
4
|
use Devel::PerlySense; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
6
|
|
36
|
1
|
|
|
1
|
|
179
|
use Devel::PerlySense::Class; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3
|
|
37
|
1
|
|
|
1
|
|
152
|
use Devel::PerlySense::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
38
|
1
|
|
|
1
|
|
3
|
use Devel::PerlySense::Util::Log; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
39
|
1
|
|
|
1
|
|
3
|
use Devel::PerlySense::Document::Api::Method; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 PROPERTIES |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 CLASS METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 METHODS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 formatOutputDataStructure(rhData) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Return stringification of $rhData suited for the Editor. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
3
|
|
|
3
|
1
|
497
|
sub formatOutputDataStructure { |
57
|
3
|
|
|
|
|
7
|
my ($rhData) = Devel::PerlySense::Util::aNamedArg(["rhData"], @_); |
58
|
3
|
|
|
|
|
5
|
my $keysValues = $self->formatOutputItem($rhData); |
59
|
3
|
|
|
|
|
9
|
return $keysValues; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 formatOutputItem($item) |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Return stringification of $item suited for the Editor. $item can be a |
69
|
|
|
|
|
|
|
scalar, array ref or hash ref. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
13
|
|
|
13
|
1
|
11
|
sub formatOutputItem { |
73
|
13
|
|
|
|
|
9
|
my ($value) = @_; |
74
|
|
|
|
|
|
|
|
75
|
13
|
|
|
|
|
9
|
my $output = ""; |
76
|
13
|
100
|
|
|
|
21
|
if(ref($value) eq "ARRAY") { |
|
|
100
|
|
|
|
|
|
77
|
1
|
|
|
|
|
3
|
$output = "[" . join(", ", map { $self->formatOutputItem($_) } @$value) . "]" |
|
2
|
|
|
|
|
6
|
|
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
elsif(ref($value) eq "HASH") { |
80
|
|
|
|
|
|
|
$output = "{" . join(", ", map { |
81
|
4
|
|
|
|
|
13
|
my $key = $_; |
|
8
|
|
|
|
|
4
|
|
82
|
8
|
|
|
|
|
4
|
my $item_value = $value->{$_}; |
83
|
8
|
|
|
|
|
12
|
$item_value = $self->formatOutputItem($item_value); |
84
|
|
|
|
|
|
|
|
85
|
8
|
|
|
|
|
12
|
$key = $self->renameIdentifier($key); |
86
|
8
|
|
|
|
|
10
|
$key = $self->escapeValue($key); |
87
|
|
|
|
|
|
|
|
88
|
8
|
|
|
|
|
19
|
qq|"$key": $item_value|; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
} sort keys %$value) . "}"; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
else { |
93
|
8
|
|
|
|
|
10
|
$output = $self->escapeValue($value); |
94
|
8
|
|
|
|
|
10
|
$output = qq|"$output"|; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
13
|
|
|
|
|
17
|
return $output; |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
16
|
|
|
16
|
0
|
8
|
sub escapeValue { |
105
|
16
|
|
|
|
|
9
|
my ($value) = (@_); |
106
|
|
|
|
|
|
|
|
107
|
16
|
|
|
|
|
17
|
$value =~ s| ([\\"]) |\\$1|gsmx; |
108
|
16
|
|
|
|
|
10
|
$value =~ s| \n |\\n|gsmx; |
109
|
|
|
|
|
|
|
|
110
|
16
|
|
|
|
|
17
|
return $value; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
1; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
__END__ |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=encoding utf8 |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 AUTHOR |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Johan Lindstrom, C<< <johanl@cpan.org> >> |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 BUGS |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
134
|
|
|
|
|
|
|
C<bug-devel-perlysense@rt.cpan.org>, or through the web interface at |
135
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-PerlySense>. |
136
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
137
|
|
|
|
|
|
|
your bug as I make changes. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Copyright 2005 Johan Lindstrom, All Rights Reserved. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
146
|
|
|
|
|
|
|
under the same terms as Perl itself. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |