Fix potential memory leak on error
Create perl namespace in virgin Lua interpreter