Vim Tips Wiki

Use this page to discuss script 556 perl-support: Perl IDE to write and run Perl scripts

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.

Reports and requests[]

Please put bug reports or feature requests at

Please help us keep track of all the issues and name your report/request:

Perl-Support: <title>

perlbrew and perl-support[]

...or how to change vim perl interpreters import path

 Can't locate Perl/ in @INC (@INC contains: /usr/local/lib64/perl5
 /usr/local/share/perl5 /usr/local/share/perl5 /usr/lib64/perl5
 /usr/share/perl5 /usr/share/perl5

While using a locally installed perl by perlbrew I installed all necessary modules for perl-support locally by cpan. Local .bashrc does source ~/perl5/perlbrew/etc/bashrc in order to use the local perl installation together with the modules installed there.

Too bad, the vim Perl interface was using the system installation and did not find those modules. So I did this inside .vimrc to copy the @INC paths of my local perl installation to the perl interpreter used by vim:

 if has('perl')
   let myINC = system("perl -e '$,=\" \";print @INC'")
   perl push @INC, split(/ /,VIM::Eval("myINC"))

I would more prefer to switch the perl interpreter used by vim itself to perlbrew. This would be more appropriate since replacing @INC completely would break the binary modules which in my perlbrew installation are compiled for a different perl version. The same happens if perlbrew pathes are put to the beginning of @INC by unshift().

So with this solution I can jump into a use Data::Dumper for example (by C-]) but with the drawback that Vim first finds the system libraries at /usr/lib/ which are not the ones perlbrew is actually using.

I did not find a way how to change the Vim's perl interpreter, not even by building Vim and modifying the Makefile. Please let me know if you know... Regards, Massimo