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 m开发者_如何学Cissing 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.
We use perl's -e option to specify on the command line code to be executed. From perlrun:
-e commandline
may be used to enter one line of program. If-e
is given, Perl will not look for a filename in the argument list. Multiple-e
commands may be given to build up a multi-line script. Make sure to use semicolons where you would in a normal program.
For example:
$ perl -e 'print "Hello, world!\n"' Hello, world!
An error similar to the one you're seeing is
$ perl -e 'while (1) { print "foo!"' Missing right curly or square bracket at -e line 1, at end of line syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors.
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..
When you run perl Makefile.PL
, you create a file called Makfefile
. Inside that file are various targets, such as test
and install
, 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.
精彩评论