Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Error "Compilation failed in require" with "use" syntax (eclipse ide)

by Anonymous Monk
on Sep 16, 2013 at 02:55 UTC ( #1054211=note: print w/replies, xml ) Need Help??

in reply to Error "Compilation failed in require" with "use" syntax

I get an error: "Compilation failed in require". This is the entire warning

I can't help you with eclipse , much, except to say this is surely a FAQ item (its @INC path management, its perl-faq)

One way to manage is File::FindLib or lib+FindBin

Absolute paths always work, you can even do the same thing using the shebang

#!/usr/bin/perl -I/hardcoded/paths -I/and/another --

Now to your shell attempt you've got typo

syntax error at -e line 1, near "use pmFile1." ^ ^ ^ ^
that is a comma not a semicolon;
$ perl -e " use strict. " syntax error at -e line 1, near "use strict." Execution of -e aborted due to compilation errors.

Generic advice :) On debugging, verify everything, talk to teddybear ... checklists and more

Replies are listed 'Best First'.
Re^2: Error "Compilation failed in require" with "use" syntax (eclipse ide)
by SuzuBell (Acolyte) on Oct 03, 2013 at 22:40 UTC
    Thanks for your input.

    When you say: "its @INC path management"; I do not feel too confident working in the terminal. I do not have much experience working with these libraries and such. Is there anything I can do in Eclipse to solve this issue? The strange this is I believe this script was working earlier. I do not know what changed or how to determine that, and how this all relates to INC path management.


      Is there anything I can do in Eclipse to solve this issue?

      Change the shebang like I showed, it will work with every perl, regardless of where its embedded


      perlrun#-Idirectory, perlvar#@INC, require, use

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054211]
[Eily]: Hi!
[Happy-the-monk]: Discipulus: si!
[Eily]: Discipulus 2018 has to be better than 2017. The latter was kinda odd, but not we got even :D

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-01-23 08:51 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (242 votes). Check out past polls.