Compilation Fail In require while using perl [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-26 13:50:16

问题


I had developed some scripts on my machine using epic & perl. But when i copied them on to other machine, I get an error message "Compilation Failed in required". How can I handle this


回答1:


The problem is with the DBI module version I had used. It is 1.619. If I rename the version in DBI module to 1.616 all the error messages are gone.

The error message occurs when we had not Loaded the required perl modules to PERLLIB. In EPIC, click where the error points to , navigate to the base error. For me the base error is at DBI. It didn't show any error message at DBI. check the script where the keyword require is present.

for me the error is shown at

Test -> DBTest -> DBAccess -> DBI




回答2:


You should be getting error messages indicating which modules weren't loaded. They're missing from your installation, so go to cpan.org or better yet just use the CPAN.pm module to load the required modules and dependencies.




回答3:


That's not the relevant message. The message you are asking about is issued after getting an error compiling a module. Fix it by fixing whatever error the module encountered.

For example,

>perl -e"use Mod;"
syntax error at Mod.pm line 4, near "+;"
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

The BEGIN failed because the compilation failed, and the compilation failed because of the syntax error. Fix the syntax error and all three errors go away (unless a new error is discovered).



来源:https://stackoverflow.com/questions/10620149/compilation-fail-in-require-while-using-perl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!