[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Non-uniqueness of module names
- From: Chris Jones <cmsj@...>
- Date: Thu, 15 Aug 2019 22:38:14 +0200
Apologies for resurrecting this months-old thread, but I would like to chime in to support the idea of `require` returning a second result of the path+filename where the module was found. This would be incredibly helpful for me in a plugin loader I'm working on in Hammerspoon. For now I'll go with Sean's ideas further down the thread (thanks Sean!), but having `require` do it for free would be a very welcome convenience!
I am not sure you are aware that the module itself already gets
---- file temp.lua
$ lua -l temp
--> temp ./temp.lua
Maybe 'require' could simply return this information as a second result?