I'm using Eclipse Perl Integration Plugin (EPIC) for developing with Perl. All its functions work great with Perl files (*.pl), but there are problems with Perl modules (*.pm) (I add them to the same project, so project settings are the same): on-the-fly syntax check does not work for them, so that I can't see any errors while coding.
Is it a bug or do I need to recheck any settings?
Thank you.
2 回答
It works for me without any problem with each .pl and .pm, so as stated in the comment you should try setting Epic Perl Editor as default editor for pm files too, you can do this right clicking on the pm file on package explorer or navigator and then selecting open With ---> EPIC Perl Editor
, as below :
Once opened with EPIC perl editor the next time will be the default for the file, because in eclipse the default editor for a file is the editor that last opened the file ...
It turned out that Perl couldn't locate current module name in @INC
, which I included to use another modules in my current module - that's why perl -c
was interrupted by error inside of the BEGIN
block.
BEGIN {
push @INC, catdir( dirname( $INC{'ThisModule.pm'} ), qw( .. ModulesFolder1 ) );
push @INC, catdir( dirname( $INC{'ThisModule.pm'} ), qw( .. ModulesFolder2 ) );
}
It caused the compiler to abort prematurely, which stopped the syntax check.
One of the possible solutions is to just use __FILE__
instead of $INC{'ThisModule.pm'}
.
More info about my concrete situation can be found in this SO answer.
And the cause of the problem was found out thanks to the following EPIC support forum topic.