lua-users home
lua-l archive

Re: Seeking advice for good style: more files than submodules

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


 > ... I would like to have multiple files, each loaded with
 > 'require', that all contribute to the same submodule.
Thanks to all who responded to this query. I learned a lot
from the examples.
Here's what I've settled on:
 local modname = ...
 local modname = string.gsub(modname, '[^%.]+$', 'commands')
 module(modname)
this gives me something I can 'require' that will extend the
'commands' submodule.
Thanks again, everyone.
Norman

AltStyle によって変換されたページ (->オリジナル) /