Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Error "Compilation failed in require" with "use" syntax

by sundialsvc4 (Monsignor)
on Sep 16, 2013 at 14:28 UTC ( #1054301=note: print w/ replies, xml ) Need Help??


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

In this case, I can tell you definitively, Eclipse is not part of the problem:   you should be able to execute that command on the command-line and get identical results.

When Perl encounters a use (or require) statement, it might subsequently do a lot of compiling, as it processes not only these modules but all of their direct and indirect dependencies.   A syntax-error anywhere can produce this result, with or without Eclipse or any other IDE.

If you do not get identical results, check your local PERL5LIB and other settings to make sure that they really are identical to those that are established in the relevant (Eclipse ...) settings.   You can be quite sure that you will find some discrepancy there.


Comment on Re: Error "Compilation failed in require" with "use" syntax
Re^2: Error "Compilation failed in require" with "use" syntax
by SuzuBell (Acolyte) on Oct 03, 2013 at 22:35 UTC
    Would the error I got from what I wrote in the command line, ie.
    perl -Mlib=/Desktop/code -e'use pmFile1;'
    be considered a syntax problem? I checked the code, I do not see any other red error logos in Eclipse. Thanks...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054301]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2014-09-16 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (47 votes), past polls