views:

325

answers:

2

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.

+1  A: 

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

It just adds ../lib to @INC.

Brad Gilbert
Merci! I've included your (and Alexandr Ciornii's) suggestion in the question and commented on why it shifts, but not solves, the problem. Maybe code can be made to exec in the IDE only?
lexu
+3  A: 

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.

kixx
Your answer describes how it should work .. but doesn't always .. Since ActiveState reacted to my question with a "bug write up", I believe you deserve credit for the correct answer. See: http://community.activestate.com/forum/how-add-project-specific-inc-module-path-komodo-without-breaking-syntax-checking
lexu