Run Ignores Include Path

lloy0076 wrote on Sat Mar 10 11:48:01 CET 2007:
My include path includes:


I didn't do that - I used add to list, navigated the file system and pointed
at the project's location on disk. I presume that the plugin realised that
I was actually pointing to the same location as an Eclipse variable and
displayed it as that.

I have this on:



Let's say I run this:


use strict;
use warnings;

#use Server;

print join ("\n", @INC) . "\n";

This will print out this:


Note that ${project_loc} is not printed out.

If I do this:

use strict;
use warnings;

use Server;

print join ("\n", @INC) . "\n";

The syntax highlighter will NOT complain, however if I run that I get this:

Can't locate in @INC (@INC contains: /usr/perl5/5.8.4/lib/i86pc-solaris-64int
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/i86pc-solaris-64int /usr/perl5/site_perl/5.8.4
/usr/perl5/site_perl /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int /usr/perl5/vendor_perl/5.8.4
/usr/perl5/vendor_perl .) at /home/lloy0076/work/programming/eclipse/Server/
line 6.
BEGIN failed--compilation aborted at /home/lloy0076/work/programming/eclipse/Server/
line 6.

NOTE: If I navigate on the command line to ${project_loc} and manually run
"perl" it won't complain.

Anyone know what's up here?

jploski wrote on Sat Mar 10 13:51:12 CET 2007:
Your description is confusing. Please mention:
- where the workspace is located in the file system (absolute path)
- what absolute path project_loc points to
- where each of your files is located in the file system (absolute path)
- to which file the quoted source code belongs
- which working directory do you run in whatever you run

Alternatively, I suggest the following organization for your code

/home/lloy0076/workspace/project/bin/   (contains use Server;)
/home/lloy0076/workspace/project/lib/   (contains package Server;)

Given that, add 'lib' (the relative path) to the @INC in project properties.
Everything (including setting breakpoints in should work fine

Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.