lua-users home
lua-l archive

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

Hello all,

I've been using Lua for a few year but have dropped off the list for several months while getting started at my new job. I'm back now working on my Emma project ( It's good to see that things here are still lively!

I really like Lua's file template mechanism ("foo/bar/?.xxx"). But it is only useful in searching for Lua or native modules. My system can also load XML files and I'd like to be able to "require" those files as well. There is a nice custom loader mechanism, but no access to the template parser. it wouldn't be hard to duplicate, but it would be nicer to be able to use the one that already exists.

Has there been any thought to exposing the parser (specifically the findfile() method. Or is there some hidden way to use this that I am not seeing? Seems like it could be easily exposed directly:

   filename = package.findfile("myfile", "xmlpath")

where xmlpath is a template in package, just like 'path' and 'cpath'.

I can certainly add this to my local copy of Lua, but it would be really nice if this were a standard feature.