2

I'm editing a test file which is typically run with prove -l which automatically includes the lib directory when searching for packages to load. When editing the file, vim-syntastic reports it can't find the needed packages because it is not looking in the lib directory.

Is there a way to tell syntastic to include the lib directory in the @INC so I can avoid the Can't locate Blah::Blah.pm in @INC error without having to do use lib 'lib' at the top of my file?

zdim
  • 64,580
  • 5
  • 52
  • 81
StevieD
  • 6,925
  • 2
  • 25
  • 45

1 Answers1

4

Found the answer. Place following in .vimrc file:

let g:syntastic_perl_lib_path = ['lib' ]

From: Perl Syntaxcheck: Add path

StevieD
  • 6,925
  • 2
  • 25
  • 45
  • 1
    If only there was something like, you know, a manual, documenting all these arcane variables... Oh, wait, never mind. – lcd047 Jan 30 '18 at 08:06
  • It's actually not in the documentation in vim. I read through it. It's in a wiki I had no idea existed. – StevieD Jan 30 '18 at 15:47
  • The contents of the wiki has been included in the manual years ago. Try `:h syntastic-perl-perl`. – lcd047 Jan 30 '18 at 16:45
  • That doesn't help me know that it existed either. Nothing in :h syntastic would let me know that help file even existed. You can't read documentation you don't know exists. – StevieD Feb 01 '18 at 15:45
  • From the "Intro" section in the help: _Take a look at the list of supported filetypes and checkers: `syntastic-checkers`._ – lcd047 Feb 01 '18 at 16:21
  • 1
    That's about as clear as mud where I can find the help. So I guess when reading documentation I can no longer rely on scanning it but I need to pore through everything the documentation says in order uncover hidden settings in obscure sections of the documentation. Clearly, this is not helpful. Your position is clearly indefensible. – StevieD Feb 01 '18 at 16:27
  • Much better would be, in the Intro, in bold and in color: This documentation covers only the core syntastic plugin. For documentation on language-specific syntax checkers use :help syntastic--. – StevieD Feb 01 '18 at 16:33