lua-users home
lua-l archive

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


On Sunday 10 July 2005 2:20 pm, Diego Nehab wrote:
> Say you have package "foo", with submodules "bar" and "baz". How do you
> deploy this package inside a single file (i.e., we want to make
> "foo.bar" and "foo.baz" be *virtual* packages) Moreover, how do you do
> it in such a way you don't have to explicitly tell the interpreter that
> "foo" has these submodules inside it (i.e, zero configuration)?

my proposal:

require"foo.bar" works as usual; but if "foo.bar" doesn't exist then try to 
require"foo" before failing.

i think that if there's a 'real' foo.bar, it should explicitly require"foo" if 
needed. avoiding just one line is ridiculous. if the packager wants to put it 
all in one file, the non-existence of submodules is enough to trigger the new 
behavior.


-- 
Javier

Attachment: pgpUL_YWg7coL.pgp
Description: PGP signature