lua-users home
lua-l archive

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


	Hi Gustavo

 require"package.module.template".  The template should be found
 the same way the module is.
Think of an XML template.  There are other examples of why this
is interesting too, but all of them relate to how finding paths
relative to the loaded module is useful.
	You may take a look at LuaDoc.  It has some HTML
templates installed as Lua modules.  I think it works very
well.

You mean before the module() call, right?  Yes, that's the workaround
I'm using now.  It doesn't feel elegant as a standard way to do things,
though.  I have code like the following already:

  local print = print
  ...
  module(...)
	I think this is very explicit and I like explicit
dependencies.  I confess that sometimes there are too many
dependencies and the code seems confused.  On the other hand
it should be time to a refactor of the module :-)

	Regards,
		Tomás