hoelzro/inline-lua

loadstring and setfenv is nil

Opened this issue · 1 comments

mowgli commented

When I wanted to compile Data::Lua, the test failed. So I did some tests and found that the core Lua functions loadstring and setfenv are not defined anymore.

Test can be done with the example from man page and the following lua code:

function answer (a, b)
 return loadstring("return "..a.."*"..b)()
end

@mowgli Thanks for the report - I'm not sure about loadstring, but I know that setfenv was removed in Lua 5.2, so you'll need to build Inline::Lua against Lua 5.1. You can do that by adapting these instructions:

https://metacpan.org/release/RHOELZ/Inline-Lua-0.17/source/Makefile.PL#L81