aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2020-09-01 14:46:30 +0100
committerJacques Germishuys <jacquesg@striata.com>2020-09-03 09:57:59 +0100
commit98dea93ba06860cd369cf151f0d5929ea24da445 (patch)
treeee9ec9f31d444ad388b204cb36fd6e30721e9f52
parentd802658ebb033e3e492b11c641d2002e33965b29 (diff)
downloadrneovim-98dea93ba06860cd369cf151f0d5929ea24da445.tar.gz
rneovim-98dea93ba06860cd369cf151f0d5929ea24da445.tar.bz2
rneovim-98dea93ba06860cd369cf151f0d5929ea24da445.zip
only perl 5.22+ is supported
-rw-r--r--runtime/autoload/health/provider.vim6
-rw-r--r--runtime/autoload/provider/perl.vim6
-rw-r--r--runtime/doc/provider.txt1
3 files changed, 10 insertions, 3 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 0482cb7f3c..be8d60dbf8 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -695,10 +695,10 @@ function! s:check_perl() abort
\ ['Install Perl and cpanminus and verify that `perl` and `cpanm` commands work.'])
return
endif
- let perl_v = get(split(s:system(['perl', '-W', '-e', 'print $^V']), "\n"), 0, '')
- call health#report_info('Perl: '. perl_v)
+
+ call s:system(['perl', '-e', 'use v5.22'])
if s:shell_error
- call health#report_warn('Nvim perl host does not support '.perl_v)
+ call health#report_warn('Perl version is too old, 5.22+ required')
" Skip further checks, they are nonsense if perl is too old.
return
endif
diff --git a/runtime/autoload/provider/perl.vim b/runtime/autoload/provider/perl.vim
index 8f9fae3c41..793bceb72d 100644
--- a/runtime/autoload/provider/perl.vim
+++ b/runtime/autoload/provider/perl.vim
@@ -11,6 +11,12 @@ function! provider#perl#Detect() abort
return ''
endif
+ " if perl is available, make sure we have 5.22+
+ call system([prog, '-e', 'use v5.22'])
+ if v:shell_error
+ return ''
+ endif
+
" if perl is available, make sure the required module is available
call system([prog, '-W', '-MNeovim::Ext', '-e', ''])
return v:shell_error ? '' : prog
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index c9efd6038e..4b6ef7e75d 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -135,6 +135,7 @@ The Vim legacy |perl-vim| interface is also supported (which is itself
implemented as a Nvim remote-plugin).
https://github.com/jacquesg/p5-Neovim-Ext
+Note: Only perl versions from 5.22 onward are supported.
PERL QUICKSTART~