Open GoogleCodeExporter opened 9 years ago
Currently supplyFile() does not expose files to the require()
function. That's an oversight, thanks for pointing to it. I will fix
that in the next release (sadly, not earlier than the end of the next
week; patches are welcome).
Meanwhile, the simplest way to workaround this is probably to load
your files manually with loadfile(), get the module tables and put
them to the package.loaded global table (key is to be the module
name).
The proper way to fix the stuff is to implement module loader instead
and add it to package.loaders table (probably inserting it after the
table's first element).
You may also try changing package.path to contain "builtin://?.lua"
among other paths before you try to do any require() calls. This
*might* also work — but I'm a bit rusty on that part of Lua
implementation to say for sure.
See the Lua manual entries on the mentioned package.* names for
details. Also it is a good idea to search lua-users Wiki for the same
names (lua-users.org/wiki/FindPage).
Original comment by aglad...@gmail.com
on 23 Jun 2011 at 9:30
The mailing list thread:
http://groups.google.com/group/lua-alchemy-dev/browse_thread/thread/2cb32459fb17
135d
Original comment by aglad...@gmail.com
on 23 Jun 2011 at 9:31
Do you have trunk or something with this issue fixed?
regards
Original comment by zaynya...@gmail.com
on 11 Jul 2011 at 11:19
Sorry, not yet :( A bit overwhelmed by work.
Will try to figure something out ASAP.
Meanwhile, patches are welcome.
Original comment by aglad...@gmail.com
on 11 Jul 2011 at 4:09
ok, will try to figure it out.
Original comment by zaynya...@gmail.com
on 11 Jul 2011 at 6:50
https://github.com/zaynyatyi/lua-alchemy
started some workaround here
few functions added (if you need list, tell me (all of them in lua-wrapper.gg.
at the end of file)). and dummy require wrapper function.
For now it doesn't check if you already imported package, but i don't need it
for now.
Original comment by zaynya...@gmail.com
on 26 Jul 2011 at 6:17
Original issue reported on code.google.com by
aglad...@gmail.com
on 23 Jun 2011 at 9:30