lua-users home
lua-l archive

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


On Tue, 2003-12-16 at 04:27, Andreas Stenius wrote:
> Jeremy Cowgar wrote:
> [snip]
> > What are your thoughts on plugins?
> [snip]
> 
> Not much. My ponderings so far has been about
> having a clean lua mod. Any additional libraries
> could be loaded with loadlib and friends from
> the script..
> Maybe base the mod_lua on LuaCheia, since they
> seem to build a nice standard way for extra plugins
> (modules). Haven't used it much yet, but I would
> look into it ;o)

Andres,

That's what I've decided upon. I will gather a collection of very useful
modules to web developers and maybe create a few examples of using them
from mod_lua.

I am basing mod_lua from the straight Lua 5.0 sources, therefore their
will be no problem compiling anywhere. It includes the
loadlib(file,function) for extensions.

The mod_lua is a clean C wrap. It currently ovewrites the print function
to send output to the client, also provides a import and include
function. It then exposes a tables, _REQUEST, _SERVER, _CONNECTION and
then two other tables about the data sent from the client, _GET and
_POST. Other than that, it also provides <?lua ... ?> block parsing so
you can:
<? for i=1,10 do ?>
Hello <?lua print(_GET.name or _POST.name) ?>
<? end ?>

(import includes a mixed Lua and HTML file, while include (which is
going away in favor of require) includes a straight .lua file).

Any comments on how it's going thus far? You can see a full manual as
well as download the source at: http://modlua.cowgar.com

Thanks for your input!

----
jeremy <jc@cowgar.com>

jeremy@myhome $ man woman
No manual entry for woman