lua-users home
lua-l archive

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

David Given wrote:
I'm going to run into this for a project I'm working on, and the
solution is straightforward; don't try to sandbox everything, but
instead write interface wrappers that run inside the sandbox but have
special conduits to the outside world (upvalues are the safest way).
They can do any additional verification that needs to be done.
Yes I always follow this policy in my projects.
Also my libraries almost _never_ manipulate global environment.
Everything is encapsulated inside so-called State objects.
Library itself is no more than a factory producing different States.
what are you actually trying to achieve?
I'm trying to make Xavante & CGILua work with lua-5.1.
I think I will follow your advice. I will rearrange them. Ha-Ha.
I will obliterate their innards. Erase & Rewrite them...