lua-users home
lua-l archive

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


Le mer. 19 janv. 2022 à 15:10, Meir Shpilraien <meir@redis.com> a écrit :
>
> Thanks for your reply, I was thinking of doing it but wouldn't a user can still use rawset to forcely set 'A1' to the global table and then my metatable '__index' function will not even be called when fetching 'A1'?

You can always replace rawset by your own version, that works on all
table except _G (throws an error when used on _G).

Julien Cugnière