如何修复“由于编译错误而中止 -e 的执行”?在 Perl 模块 Makefile 中?
我在 Windows 上使用 Strawberry Perl。我为 Buckwalter Encode 模块运行 perl Makefile.pl
,效果很好。当我运行 make
时,它说
由于编译错误,-e 的执行中止
什么是 -e
?我应该去哪个文件来修复错误?显然,第 1 行缺少一个大括号,但我不知道哪个文件缺少大括号,所以我不知道去哪里查找。
I'm on Windows using Strawberry Perl. I run perl Makefile.pl
for the Buckwalter Encode module, that works fine. When I run make
, it says
Execution of -e aborted due to compilation errors
What is -e
? Which file do I go to fix the error? Apparently there's a missing curly bracket on line 1, but I don't know which file has that missing curly bracket so I don't know where to look.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我们使用perl的-e选项在命令行上指定要执行的代码。来自 perlrun:
例如:
与您看到的错误类似的错误是
We use perl's -e option to specify on the command line code to be executed. From perlrun:
For example:
An error similar to the one you're seeing is
好吧,从 make 到 dmake 再到 cpan ..我刚刚切换到使用 CPAN 客户端,并且做了
“测试编码::巴克沃尔特”然后
“安装 Encode::Buckwalter”,效果很好!
不知道为什么会发生错误...也许是一些平台问题..
Well, from make to dmake to cpan.. I just switched to using the CPAN client, and did
"test Encode::Buckwalter" and then
"install Encode::Buckwalter" and it worked fine!
Don't know why the errors happened then... perhaps some platform issues..
当您运行
perl Makefile.PL
时,您将创建一个名为Makfefile
的文件。该文件内部包含执行实际工作的各种目标,例如test
和install
。其中一些是使用-e
作为 Perl 单行代码实现的。不过,您已经通过使用正确的 make 变体解决了您的问题。
When you run
perl Makefile.PL
, you create a file calledMakfefile
. Inside that file are various targets, such astest
andinstall
, that do the real work. Some of those are implemented as Perl one-liners using-e
.You've already solved your problem by using the right variant of make, though.