line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VIM::Packager::Utils; |
2
|
1
|
|
|
1
|
|
15
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use Exporter::Lite; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @EXPORT = (); |
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw(vim_inst_record_dir vim_rtp_home findbin); |
8
|
|
|
|
|
|
|
|
9
|
0
|
|
|
0
|
0
|
|
sub vim_inst_record_dir { File::Spec->join( $ENV{HOME} , '.vim-packager' , 'installed' ) } |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
0
|
|
sub vim_rtp_home { return File::Spec->join( $ENV{HOME} , '.vim' ) } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub findbin { |
14
|
0
|
|
|
0
|
0
|
|
my $which = shift; |
15
|
0
|
|
|
|
|
|
my $path = $ENV{PATH}; |
16
|
0
|
|
|
|
|
|
my @paths = split /:/, $path; |
17
|
0
|
|
|
|
|
|
for (@paths) { |
18
|
0
|
|
|
|
|
|
my $bin = $_ . '/' . $which; |
19
|
0
|
0
|
|
|
|
|
return $bin if ( -x $bin ); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |