I'm getting this syntax error:
'RUNID' is reserved and cannot be used as a parameter.Compilation failed in require
In one of the pm file there is a variable declared $runid. I don't think "runid" is reserved, only all CAPS "RUNID" is reserved.
I have perl 5.8.9 and epic 0.6.43 with eclipse 3.4.2.
please help to resolve this error. I cannot change the variable name as it is out of my control.
Even though I can't reproduce the problem, I can tell that it has nothing to do with EPIC. Try checking your source file with "perl -c" and it will most probably give you the same result.
Now I know this is something related to the my project.
When I run from the prompt "perl -cw <script>" I got the same error.
Because my project required it to be complied different way "perl -cwI<LINT LIB PATH> -M<LINTMODULE> <script>.
Now the question is Can I do the same with Epic plugin also? Is there any way to update the build options?
The -w option can be turned on with "Enable warnings" in Preferences (though "use warnings" in the source file seems a better approach generally). -I options are added by EPIC automatically based on the include path specified in project's Properties. The -M option cannot be specified per project, but you can add it in the "Perl executable" field of Preferences to make it globally active. You could also add an -I option there. If you want to add options for an individual source file, you can do it in the #!/usr/bin/perl line of the script. However, this won't work under Windows IIRC.
If you really wanted a per project -M option, you could replace the Perl interpreter with a wrapper which inserts options based on the path passed to it and use that wrapper as "Perl executable" in EPIC.
I tried -M options with perl interpreter and it worked. The only problem with this it hangs the auto completion of modules. Then I tried with warper way. I wrote a wrapper in shell to check if it is compiling (-c option) then use -M options or use normal perl interpreter. Now no hang on completion of modules, it works perfectly.
Thanks a lot.
Above script works but now 'perdoc' is not working. Now when I do perldoc on keyword I get something like this
Do I need to do something in script to run perldoc.
Currently my script just check if "-c" is passed as parameter then use -M option or just use perl.
When you invoke perldoc on "print", EPIC starts perl and passes the following source text over stdin:
use Env qw(@PERL5LIB);
splice(@PERL5LIB, 0, 0, @INC);
exec("perldoc -t -f \"print\"");
Make sure that "yourscript < script.pl" and "perl < script.pl" produce the same output when using the above snippet as "script.pl".
Yes it is.
I guess the only problem I had was, I did not put 2>&1 after my perl call so I was not getting standard errors.