lua-users home
lua-l archive

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



I follow your pattern of thought, seems simple & good.

A good example of multi-tier module naming is luaSocket. There I don't think 'lua.socket' itself would be very useful, but applications might require 'lua.socket.smtp' etc. directly. Then, those submodules would have require 'lua.socket' to make sure they get the generic goodies, too. :)

This is somewhat different than your example. Of course, it could be implemented by 'lua.socket.*' too.

-ak

30.9.2004 kello 18:56, David Jones kirjoitti:

When might I have a package that has the same name as a module? And would it be useful to require the module alone without getting the rest of the package as well? I can't think of any good example, but maybe I'm just being unimaginative.