On Tue, Apr 21, 2015 at 1:04 PM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 21 Apr 2015, at 11:11, Peter Balsianok <balsianok.peter@gmail.com> wrote:
Hi,
You are not right. %RAD_PERLCONF is available also during 'Instantiation'.
Yeah, but that's still calling a perl subroutine, just without a request pointer.
The question is: Would it be available also during compilation phase (like radiusd::radlog)
For that to work you'd need to get it into the perl environment as a global, before parsing the perl file. It'd also have to be made constant to prevent people from doing stupid things.
I'll take a look at it and see if it's doable.
Config section (example) config { path = value } in freeradius will be created before parsing: use constant RAD_PERLCONF => { path => value }; then you can use it RAD_PERLCONF->{path} Of course, if it`s possible.
I just... feel so dirty after looking at perl... or the embedding API... or the documentation for the embedding API. It's like digging in to a big bowl of chocolate pudding, to discover it's actually dog shit.
You are right.