lua-users home
lua-l archive

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


Hey, there has been a semi-major update for LuanrCGI that hopefully
allows more structured programming.
Previous versions would always put exported variables in templates in
the global namespace, the new update fixes that
by putting all variables in the table 'env':

    cgi:template("<b>hello <%=env.name%>", {name="world"})

Also, the internal var '__self__' is now in the table '__lunarcgi__'
as '__lunarcgi__.self'.
Standard library tables are in the table 'std'.

So there will be *hopefully* no global variables anyway.

PS: Since i'm writing LunarCGI all on my own, feedback is highly
appreciated - tell me what you like and what you don't! It will help.

Thank you