4

I'm working on a small Perl program in Eclipse that involves using my own Perl module. This module is saved in my current project's workspace so it should be in the Perl include path by default, but Eclipse has one of these annoying red "x's" telling me that it cannot find the module. When I hover over the "x" it says:

Can't locate in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/lib)

I went into my project properties and tried to modify the "Perl Include Path" to include "." (The current working directory) but it won't let me add to the include path.

Project properties

I can't add anything to the include path, not even a different directory altogether. The second I click "OK" I get this error message:

Error message

I even get the error message if I make no changes at all! If I just go to that page in "Project Properties" and click "OK" I will get the error message without even trying to add to the Perl Include Path.

Does anyone have any idea what is going on here? I have searched the internet for a few days now with no luck. I have not seen anyone having the same issue or anything similar. This is getting very frustrating and I appreciate any help.

Thank you


EDIT:

Here is some information about my version of Eclipse, just in case that helps with solving this issue.

About Eclipse

More information:

After messing with this a little more I realized that if I go into the "Perl Include Path" section of the project properties at all, even if I make no changes and leave it and click "OK" in a different section, I still get the error message. Somehow this error is caused simply by clicking on the "Perl Include Path" tab without doing anything else.

tjwrona1992
  • 8,614
  • 8
  • 35
  • 98
  • Are you running Perl in taint mode? If EPIC passes the path to Perl using an env var, that will fail in taint mode. (It will work if it uses `-I`.) – ikegami Nov 03 '14 at 15:00
  • Tip: The current work dir might not be what you expect. `${project_loc}` (or `${project_loc}/lib` if you use the standard layout) would be more appropriate. I realize this isn't the issue you are talking about, though. – ikegami Nov 03 '14 at 15:01
  • Could be your project is somehow corrupt. I'd try deleting the project file(s) (after backing up your project, of course) and recreating it. – ikegami Nov 03 '14 at 15:04
  • @ikegami I was running it in Taint mode but that isn't the problem, I unchecked the Taint mode box and tried again and it still wouldn't let me change the include path. This issue is occurring before I even run my script. I get the error when I try and change my project properties, not when I click run. In fact the script appears to run successfully even though "." isn't in the include path which is even more confusing. – tjwrona1992 Nov 03 '14 at 15:10
  • Right, I only noticed that between my first and third comment :) `.` is normally in the include path when taint isn't used. – ikegami Nov 03 '14 at 15:11
  • @ikegami I tried deleting and recreating the project and something even stranger happened. The bug is still there where it won't let me add to the include path, but now it does say that "." is part of the include path. What's even stranger is that even though "." is part of the include path now it still has a little red "x" and says it cannot find my module. When I click run it warns me of errors but then works successfully... – tjwrona1992 Nov 03 '14 at 15:24
  • As of 2022 using Eclipse 2019-03 , this issue still occurs for me. The error is a red herring as the program still functions correctly in spite of the error and annoying, squiggly, red line. One work around is to use the require instead of use keyword to identify the module to be used since require looks for the module at runtime. – shawn1874 May 02 '22 at 19:52

0 Answers0