lua-users home
lua-l archive

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


On Apr 5, 2014, at 10:09 PM, tonyp@acm.org wrote:

> I think the first place to look for required modules would be the (main) script’s directory.  That also allows to override general libraries with customized versions using the same name but placing them in the app’s folder.

One relatively painless way to achieve this is to (1) look at where the main script was loaded from (e.g. debug.getinfo( 1, 'S' ).source) (2) Add that path to package.path (3) There is no step (3).