Comments (9)
Although this configuration solves the issue regarding the Perl interpreter and @INC
configuration, when I used the \rs (check syntax) command I always got something that is missing in the current @INC
, for example:
ListEvtLogLvl.pm|3| Can't locate Moose.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .)
ListEvtLogLvl.pm|3| BEGIN failed--compilation aborted
Since I'm using Perl 5.16, this configuration is wrong. I doubled checked the @INC
configuration with this in the .vimrc:
if has("gui_running") && filereadable($HOME . "/perl5/perlbrew/etc/bashrc")
let $PATH=system("source " . $HOME . "/perl5/perlbrew/etc/bashrc; echo -n $PATH")
let $test=system("perl -E 'foreach(@INC) { say $_ }'")
echo $test
endif
And the dialog box showed the correct configuration.
Reviewing the perl-support.vim plugin, I found that the Perl interpreter path being used in hard coded to "/usr/bin/perl" but that does not help with Perlbrew. I added the following (line number included):
162 let s:Perl_Perl = system("/usr/bin/which perl")
163 let s:Perl_Perl = substitute(s:Perl_Perl, '\n$', '', '')
And it seems to be working correctly now when checking syntax,
from vim-plugins.
You can actually set the Perl executable in your .vimrc using "g:Perl_Perl", see:
:help perlsupport-perl6
from vim-plugins.
For some reason that help is not available:
E149: Sorry, no help for perlsupport-perl6
I tried on a CentOS 7, with Vim 7.4.160.
from vim-plugins.
The help topic should still be there. But I renamed the setting to g:Perl_Executable
.
Try using the map \hp
or the menu entry Perl -> Help -> help (Perl-Support)
, it will generate the helptags for Perl-Support if they are not available.
from vim-plugins.
This still works:
let g:Perl_Executable = 'perl'
ubuntu 17.10
vim 8
perlbrew
perl 5.26
from vim-plugins.
This is the default as of version 5.4.1, 132828c : let g:Perl_Executable = 'perl'
Hopefully this will resolve the perlbrew problems and always use the version you use in the shell, by actually choosing the correct executable from $PATH
.
from vim-plugins.
Tried that on Ubuntu 18.04, latest release of perl-support.
Setting let g:Perl_Executable = 'perl'
on ~/.vimrc
works as expected, including for properly locating modules on custom @INC
, but not for Gvim: even after repeating the configuration on ~/.gvimrc, the "selected" perl with Perlbrew doesn't work.
Double checked by running !perl -v
on [G]Vim command mode, and on Gvim the standard perl that comes with Ubuntu is used.
from vim-plugins.
OK, good debugging there. Unfortunatly it seems like the problem is not with Perl-Support itself, so it's harder for me to help you. Perl-Support depends on being able to run !perl -v
correctly.
Could you compare the output of Vim vs. gVim when you run this on the Vim command line: :echo $PATH
Does it make a difference if you start gVim from a terminal or the desktop (using the Unity-App-Search-And-Starter-Thingy, whatever that's called)?
from vim-plugins.
Sorry for taking so long to answer.
Yes, it does make a difference. I tested calling from the Desktop, it doesn't work but if I open gVim from the terminal, it does work as expected.
Tested on CentOS 7.
from vim-plugins.
Related Issues (20)
- perl path on windows
- template error message HOT 4
- Add lua support into SpaceVim. HOT 12
- Bash-Support: g:BASH_Ctrl_j = 'off' ignored HOT 3
- C-support: how to integrate c-support into existing vim config HOT 5
- Bash support: broken highlighting on ${var/pat/} HOT 1
- Perl-Support: Extending the Perl/POD templates and menu HOT 2
- C-Support: header and implementation comment interchanged HOT 1
- C-support: How to display output in gVim and not vimrun? (Windows 10) HOT 1
- bash-support: Go to end of file after inserting a new header HOT 6
- c-support: Modified class template ignores filename HOT 2
- c-support: Spacing in template is ignored HOT 2
- Bash-Support: function calls references HOT 5
- Bash-Support: parce call stack on error HOT 8
- Not working here HOT 4
- Bash-support - GVim and templates question HOT 2
- Perl-Support: E488: Trailing characters HOT 7
- C-Support: Change C idiom function return indent HOT 6
- c-support Duplicate Tags HOT 1
- nr cmd vim tips e486 error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-plugins.