Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by sundialsvc4 (Abbot)
on Sep 16, 2013 at 14:28 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1054301]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-20 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found