On 10/24/10 10:14 PM, Alex Balashov wrote:
On 10/24/2010 03:34 PM, Daniel-Constantin Mierla wrote:
what do you mean by outside process?
For example, with app_lua, the interpreter is linked to the code, so is no external process, it is like cfg interpreter, just that it resides in a module, not in core.
Oh, I did not realise it is so persistent.
I thought it worked more like Apache's mod_php, where the interpreter and dependencies are loaded into memory so that the entire language runtime does not need to be initialised each time a script is invoked, but the script itself is still loaded anew every time.
What you are suggesting is that the 'perl' module works more like mod_perl, where the user-supplied script itself is loaded into memory persistently?
perl module loads the script specified by filename parameter in mod init. It parses it in the interpreter and then you can execute perl functions from inside the script at runtime.
So, it is not loading it every time a function is executed. There is some code to be able to reload, but afaik, feature was not finished.
Regarding lua, there are couple of functions, some of them allowing to execute parts of a file loaded at startup, other will load the script every time.
Cheers, Daniel