-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading files #83
Comments
You are the first to ask for it. I will see what I can do. Btw we do have loadfile and dofile. They are in the list of currently supported Lua library functions listed in README. |
Yes, I tried both loadfile and dofile, but neither of them work for some reason. Whether I specify a relative or absolute path, with or without the |
Could you give me an example? |
Sure, although I'm not sure how much additional information this provides, I'm afraid it's not too much. I'm using VerneMQ and I'm trying to read a configuration file like this:
In a VerneMQ plugin file, which is successfully run, I was trying to call:
where This, however, failed: the VerneMQ error console said that |
This is the first I have heard of VerneMQ at all and that it uses luerl. 😄 I will try to check and see what is happening. One thing is that Can you also send me the plugin? If I still can't make head or tails of the problem I will contact the VerneMQ people myself and ask for help. |
@rvirding Thanks for your reply! Yes, I figured that the current directory is something related to the environment, that's why I tried with the absolute path as well. I assume the path should have been correct, because it was one of the first things that popped in my mind, so I checked it many times with e.g. I'll have to check with my manager whether I am allowed to post the plugin – it's for an internal company project. I'll get back to you once I know that. |
Hi, I am getting back into luerl now. Did you send me that plugin, I can't see it anywhere? How does VerneMQ use luerl? |
I tested this from the erlang shell putting the config in the file "v.lua" then doing
and it seemed to work. |
Hi, and thanks for getting back! Unfortunately, the project has since been abandoned, and I no longer seem to be able to find the source for that plugin. 😞If it does (and is supposed to) work, then I can imagine it was only a problem with my setup… Anyway, thanks for making luerl! |
Hello, Kind regards, |
It does not appear to be possible to read files in any way. io.read doesn't exist, io.input doesn't exist, etc. Why? It's really annoying (also the fact that this is completely undocumented). loadfile, dofile, etc. don't work either, so they can't be used as a workaround (I want to read a config file). It's incredible that such a trivial task cannot be accomplished after several days of googling and trying to find any documentation on this issue -- without success.
The text was updated successfully, but these errors were encountered: