lua-users home
lua-l archive

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


On Sat, Aug 9, 2014 at 11:54 AM, Axel Kittenberger <axkibe@gmail.com> wrote:
> I'm in fact using Lua as configuration language. Having config files set
> global varialbles proofed to be a bad idea, since there is not spell
> checking and cause lots of issue reports filled in, because people
> misspelled one key and then complain that the application didn't complain at
> all and silently ignored the setting. Been there, done that.


A.- don't use "global" globals for config.  if <=5.1, use setfenv, if
>=5.2 set _ENV, so you gather all those variables in a table of your
choosing

B.- after reading all the known settings, check any remaining keys and
complain about those.

-- 
Javier