lua-users home
lua-l archive

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



On Jan 21, 2009, at 11:51 PM, František Fuka wrote:

Another possibility was to simply "require" all the modules and then iterate through the whole package.loaded table, finding all tables which have item with key "test_function" whose value is function (I know other modules don't
contain this function).

As mentioned by Sam Roberts, once you have found such function, you could use debug.getinfo( aFunction, 'S' ).source to get its source location and correlate that to your initial filename list.

Here is an example of using debug.getinfo:

http://dev.alt.textdrive.com/browser/HTTP/Bundle.lua#L52

HTH.

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/