lua-users home
lua-l archive

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



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.

local func_dependency = require"mydependency".func

    The names are just illustrative :-)  Does it solve your
problem?

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(...)

--
Gustavo Niemeyer
http://niemeyer.net