[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: package system
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 22 Aug 2002 17:43:11 -0300
I have put in the wiki an embryonic proposal for a package system for
Lua 5.0. (http://lua-users.org/wiki/PackageSystem). 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 "pack1.foo()".
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