On Thursday 16 February 2006 12:54, freeradius@singularity.co.za wrote:
Hi Boian,
Thanks for the response. The example.pl is easy enough to understand. From the rlm_perl source code am I to understand that the radiusd.conf configuration defaults if written out would look something like:
Yes it is correct
If this is correct, then most of it is easy to understand. What would "perl_flags" be used for tho'?
It can be used to run perl with some flags like perl -W or perl -MCPAN personally i use it for debuging purposes.
I might not be understanding persistence, what I would like to know is when the script is run, does it stay in memory and the functions repeatedly called from the script in memory?
Yes
If I open a database connection in the script, will it remain open across multiple radius queries until the clone is destroyed, or does the script get rerun by the loaded interpreter each time? I can live with restarting the server if the script changes.
If your perl is threaded then you will need to use subroutine called CLONE in which you can define local variables per thread. This subroutine is called automatically from perl when new clone is created. You can put for example database connections in this sub (sorry no example in example.pl) In this case it will be better to use fixed size pool of perl clones (this is to avoid destroy and reconnect to DB) max_clones = 32 start_clones = 32 min_spare_clones = 0 max_spare_clones = 32 cleanup_delay = 5 max_request_per_clone = 0
Thanks Philip
Boian Jordanov said:
On Thursday 16 February 2006 11:20, freeradius@singularity.co.za wrote:
Hi All,
I'm keen to start using the rlm_perl module now that it has been made stable. However I find that the documentation relating to the module is sparse. Is there any official documentation on this module that anyone knows of?
No, sorry but you can check example.pl which is included with freeradius.
I would also like to know whether the perl module loaded is persistent.
No it is not persistent. If you change code of your perl script you will need to restart freeradius.
-- Best Regards, Boian Jordanov SNE Orbitel - Next Generation Telecom tel. +359 2 4004 723 tel. +359 2 4004 002 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Best Regards, Boian Jordanov SNE Orbitel - Next Generation Telecom tel. +359 2 4004 723 tel. +359 2 4004 002