Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Eclipse on a mac, was working fine adding new modules until I Installed Text::CSV_XS which Eclips doesn't recognise as added to @INC For instance

use strict;
use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI->dispatch_to('C2FService')->handle;

BEGIN {

    package C2FService;
    use vars qw(@ISA);
    @ISA = qw(Exporter SOAP::Server::Parameters);
    use SOAP::Lite;

    sub c2f {
        my $self     = shift;
        my $envelope = pop;
        my $temp     = $envelope->dataof("//c2f/temperature");
        return SOAP::Data->name(
            'convertedTemp' => ( ( ( 9 / 5 ) * ( $temp->value ) ) + 32 ) );
    }
}

use SOAP::Transport::HTTP; is marked as error if I comment it out use SOAP::Lite; is in turn marked as an error, not found etc the usual if a module is not installed. Both are installed with CPAN and

$ perl -c soap-test.pl 
post-code-check.pl syntax OK

Perl is fine CPAN tests are all pass, the code works, only EPIC lags behind.

$ pwd && ls 
/opt/local/lib/perl5/site_perl/5.12.4/SOAP
Client.pod      Lite            Server.pod
Constants.pm        Lite.pm         Test.pm
Data.pod        Packager.pm     Trace.pod
Deserializer.pod    SOM.pod         Transport
Fault.pod       Schema.pod      Transport.pod
Header.pod      Serializer.pod      Utils.pod

And if I have use errors in the start of my files the rest of the source is not error checked..

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I managed to fix this by adding all the paths I found on my system to the project include path manually through (click in the source of your project) > Project > Properties Go to the root directory of your project and open the .includepath file and make sure there are no trailing spaces after the paths and the closing quotes:

<includepathentry path="/opt/local/lib/perl5/vendor_perl/5.12.4 " /> which some of my entries had even though I just copy pasted them in Eclipse's GUI from the terminal there's no way there could've been a trailing space.

After all of these of course clean projects from the same Project menu.

share|improve this answer
    
I'm having this same problem but I don't have a .includepath file on the root of my Perl project. Also I ignore where cpan installs modules so to add the path... –  m0skit0 Jun 21 '12 at 9:36
1  
You can create one by focusing in the project (click on a src file in the proj explorer) then from the menus Project > Properties > "Perl Include Path" when you change that it should make a file. BTW you may not see it, hidden, starts with . –  Recc Jul 9 '12 at 9:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.