lua-users home
lua-l archive

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



On Dec 4, 2012 6:39 PM, "Daurnimator" <quae@daurnimator.com> wrote:
>
> On 4 December 2012 18:02, Andreas K. Foerster <list@akfoerster.de> wrote:
> > For example:
> >   lua -l akfavatar.utf8
> > correctly loads the module, but it defines a global name "akfavatar.utf8",
> > which is not accessible, since the dot is reserved for table access...
> > I think the variable should only be "utf8" then.
>
> Not that it's a complete solution; but you can do _G["akfavatar.utf8"]
> to access it.
The more proper way to fix it,I think, would be to treat it like normal "require" where nested tables are constructed.  Ex: akfavatar.utf8 would be how you'd access the module.