How can I add a project specific @INC module-path to Komodo without breaking syntax checking?

StackOverflow https://stackoverflow.com/questions/879342

  •  22-08-2019
  •  | 
  •  

Question

For a Perl porting project I am using ActiveState's Komodo IDE 5.1

For external reasons, the xyz.pm modules reside in a different directory tree. By adding a PERL5LIB=<> under the "environemt" tab of the debu/run dialog, I can show Komodo/Perl how to run the script.

Unfortunately the syntax checking doesn't seem to evaluate those directives and the IDE claims there was a fatal "can't locate xyz.pm" error, despite the fact that the script runs fine.

One way to fix this is to add the module path using the "Additional Perl Import Directories" under <Edit><Preferences><Languages><Perl>, but that is a global directive, not project specific, which leads to all kinds of interesting problems when module names collide.

So, how can I configure the Komodo IDE to store "Additional Perl Import Directories" [the @INC path for syntax checking] with the project?

EDIT: The suggested method of adding use lib qw'../lib'; might be helpful, if only I could make it execute in the IDE only. But this code must not show up in the production environment, where the start-up script sets the environment correctly.

Was it helpful?

Solution

For Komodo IDE 5.0.1:

Project (top menu bar) -> -> Properties -> Languages (left menu) -> Perl

This will allow you to add "Additional Perl Import Directories" which is what you want.

OTHER TIPS

I have put a use lib qw'../lib'; to get Komodo to highlight correctly.

It just adds ../lib to @INC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top