glasswalk3r has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellows monks,

I've being using Vim with the perlsupport script successfully for years. A couple of months ago I started using Perlbrew (which is indeed such great tool) but I'm not being able to make Vim understand that I'm using a Perlbrew perl instead of the system one.

I added the following piece of code to my .vimrc file:

" Enable perlbrew path if has("gui_running") && filereadable($HOME . "/perl5/perlbrew/etc/bas +hrc") let $PATH=system("source " . $HOME . "/perl5/perlbrew/etc/bashrc; e +cho -n $PATH") endif

And while it does the trick with the path to the current select perl, it does not understands the search path of the installed modules within the select perl interpreter.

I tried adding a:

let $PERL5LIB=system("perl -E 'say join(q{:},@INC)'")

But then I got error messages while syntax checking my code about incorrect version of Dyna::Loader.

Is there any way to get everything running as expected?

I'm using Perlbrew with perl v5.16.3 as default.

Thanks,

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

Update: for those who are struggling to get this work, I added a tip as an issue into the perlsupport Github here.

Replies are listed 'Best First'.
Re: Configuring Vim to make peace with Perlbrew
by wjw (Priest) on Apr 15, 2014 at 10:18 UTC
    Interesting question, though not directly Perl related...
    vi(m) is certainly not my area of expertise. I did a quick search and did not find an answer but I think
    you may find that the individual who wrote the following post might be able to help you with
    this:
    This guy seems to know his stuff regarding vi(m) and seems to be interested in making it work with Perl.

    I do understand having spent a lot of time with a given editor/dev environment and wanting to enhance it, only to find that
    it does not happen at the snap of a finger... .

    Best of luck with this and I hope you find this helpful.


    ...the majority is always wrong, and always the last to know about it...
    Insanity: Doing the same thing over and over again and expecting different results...

      Thanks! I went down their Github repository and added something that might help with this issue!

      Alceu Rodrigues de Freitas Junior
      ---------------------------------
      "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill