[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: FInding the real name of a module
- From: Petite Abeille <petite_abeille@...>
- Date: Thu, 22 Jan 2009 07:30:19 +0100
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/