Gvim cannot find Perl modules

I am trying to write a function in gvim that will use the File::Path module. But he warns me "Can't locate File/Path.pm in @INC(@INC contains: .) at (eval 8) line 1. BEGIN failed--compilation aborted at (eval 8) line 1." when gvim starts up. I know this means that gvim could not find my path to perl lib. So my question is: How do I tell gvim the right way to search for Perl modules? I tried to add use lib'C:/Perl/lib'; but the problem continued. Thanks ~~~

 if has("perl") function! Make_dir() perl make_dir(); endfunction autocmd VimEnter * call Make_dir() perl <<EOF use File::Path; sub make_dir{ my $bakup=$ENV{'HOME'}."/bakup" ; mkdir $bakup if not -e _; #VIM::SetOption("backup"); #VIM::SetOption("backupdir=$bakup"); #VIM::Msg($bakup); #todo.... } EOF endif 
+4
source share
2 answers

Have you censored your result, or does it really only say " (@INC contains: .) "? This would seem to indicate a poor Perl installation. There should be a few more directories. I think this may indicate a resolution problem.

use lib does not work because Perl cannot find lib.pm or any other module that it comes with. -I should work, but this will only be a fix for bandages.

+2
source

http://vim.wikia.com/wiki/Script//56 By the way, I tried the wiki tips on VIM as well ... but the problem continued

+1
source

All Articles