Wikia

Vim Tips Wiki

Changes: Script:556

Edit

Back to page

(perlbrew and perl-support)
(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
Line 1: Line 1:
{{ScriptComments|556|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 using menus and hotkeys}}
   
==Comments==
+
==perlbrew and perl-support==
 
 
== perlbrew and perl-support ==
 
 
...or how to change vim perl interpreters import path
 
...or how to change vim perl interpreters import path
   
Line 18: Line 18:
   
 
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().
 
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.
 
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,
+
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
Massimo
+
  +
==Comments==

Revision as of 08:04, November 15, 2011

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

  • 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.

perlbrew and perl-support

...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

Comments

Around Wikia's network

Random Wiki