aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/perl.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin/perl.vim')
-rw-r--r--runtime/ftplugin/perl.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim
index d0bdbc0cfb..edc7b960f1 100644
--- a/runtime/ftplugin/perl.vim
+++ b/runtime/ftplugin/perl.vim
@@ -54,7 +54,8 @@ endif
" Set this once, globally.
if !exists("perlpath")
- if executable("perl")
+ " safety check: don't execute perl from current directory
+ if executable("perl") && fnamemodify(exepath("perl"), ":p:h") != getcwd()
try
if &shellxquote != '"'
let perlpath = system('perl -e "print join(q/,/,@INC)"')