lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello all,

I like to preload libraries in my application in package.preload so there are not globals and user can still load them individually with `require'. However, I'm guessing if it is possible to sandbox the require function so it only seeks the host application package.preload list instead of all the other ones.

But users can still modify the package.* variables in its user script (even if we add a __newindex or securities like that, it can uses rawset).

What is your advice on that?

Regards,

--
David Demelier