Wikia

Vim Tips Wiki

Changes: Script:556

Edit

Back to page

(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
 
Line 1: Line 1:
{{ScriptComments|perl-support: Perl IDE to write and run Perl scripts using menus and hotkeys}}
+
{{ScriptComments|perl-support: Perl IDE to write and run Perl scripts}}
  +
  +
==Reports and requests==
  +
Please put bug reports or feature requests at https://github.com/WolfgangMehner/vim-plugins
  +
  +
Please help us keep track of all the issues and name your report/request:
  +
:Perl-Support: <title>
   
 
==perlbrew and perl-support==
 
==perlbrew and perl-support==

Latest revision as of 12:32, February 12, 2013

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 vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Reports and requestsEdit

Please put bug reports or feature requests at https://github.com/WolfgangMehner/vim-plugins

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

Perl-Support: <title>

perlbrew and perl-supportEdit

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

 Can't locate Perl/Tags.pm 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"))
 endif

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

CommentsEdit

Around Wikia's network

Random Wiki