This change fixes '=' handling in
lua.pl:
@@ -275,7 +275,7 @@
if ( $firstline && substr($b, 0, 1 ) eq '=') # first line starts
with `=' ?
{
-
$L->pushfstring( "return %s", substr($b,1)); # change it to `return'
+
$L->pushfstring( "return %s", $b+1); # change it to `return'
}
To avoid a symbol-not-found error on Ubuntu, I had to build with the suggested
perl
Makefile.PL LUA_INC=-I/usr/include/lua5.1 LUA_LIBS='-llua5.1'
It might be nice if
lua.pl had some way for the end-user to embed Perl
code from the interpreter, maybe by exposing some Lua function that
converts a Perl string to a Lua function.
[1]
http://cpansearch.perl.org/src/DJERIUS/Lua-API-0.04/examples/lua.pl[2]
http://thomaslauer.com/comp/Calling_Perl_from_Lua