lua-users home
lua-l archive

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


The package proposal allows for a lot of freedom. This is because Lua is
used embeded in applications that might have especial needs.

But does suggests the standard way of writing a package. This is with
the use of the module() function.  This function has a very well
specified behaviour. If your package uses module() (and it should use
it), then both

    local foo = require"foo"
    a =


    a =

will work. That's it. This is true of all libraries that don't try to be
creative by not using module().

The proposal also specifies search order and search locations for all
types of libraries. It also specifies how to override many details that
can be specific to your deployment platform, doing so in such a way that
will make other people's libraries work in your system anyways.

At the moment, we are in transition. In the future, all libraries should
be be consistent. Please consider using the package proposal, as it will
make everyone's life easier in the long run.

If there is anything you would like to be able to do when you package
your libraries, but feel you can't do with our proposal, this is the
right venue to talk about it. Chances are we can figure out how to do it
so that everything is compatible.