lua-users home
lua-l archive

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

I have put in the wiki an embryonic proposal for a package system for
Lua 5.0. ( It is a subset
of a mix between Perl and Python systems ;-)

   use "pack1"

loads file pack1 into a new "namespace" pack1, so that you can call
functions defined there as "".

  use "pack1" {import="*"}

does the same, but also polutes your own namespace with all global
names defined in pack1.

  use "pack1" {import={"foo", "goo"}}

defines only "foo" and "goo" into your namespace (you can still call
the other functions with a full name, "pack1.other()").

  use "pack1" {version=1.4}

should do something meaningful, but doesn't (currently).

-- Roberto