From: Nick Porter Date: Wed, 23 Apr 2025 11:25:12 +0000 (+0100) Subject: Update docs from updated perl module X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d575cdfb35e60a44e0970d37d9928e08749d967;p=thirdparty%2Ffreeradius-server.git Update docs from updated perl module --- diff --git a/doc/antora/modules/reference/pages/raddb/mods-available/perl.adoc b/doc/antora/modules/reference/pages/raddb/mods-available/perl.adoc index 0f41a7436b8..859e6e438d8 100644 --- a/doc/antora/modules/reference/pages/raddb/mods-available/perl.adoc +++ b/doc/antora/modules/reference/pages/raddb/mods-available/perl.adoc @@ -10,10 +10,19 @@ The `perl` module processes attributes through a Perl interpreter. * Please see http://www.perl.org/docs.html for more information about the Perl language. -NOTE: Uncomment any `func_*` configuration items below which are -included in your module. If the module is called for a section which -does not have a function defined, it will return `noop`. +NOTE: As of FreeRADIUS v4, the Perl subroutine names called when the `perl` +module is called are automatically derived from the section in which +they are called. +e.g. if `perl` is called in `recv Access-Request`, firstly a subroutine +`recv_access_request` will be looked for. If that does not exist, then +a subroutine `recv` will be looked for. + +This can be overridden by setting `func_recv_access_request` or `func_recv` +to point to a different subroutine name. + +In addition the option `func_detach` can be used to set a subroutine to call +during shutdown. ## Configuration Settings @@ -72,9 +81,14 @@ FreeRADIUS server. -List of functions in the module to call. Uncomment and change if you -want to use function names other than the defaults. +func_detach:: Subroutine to call during server shutdown + + + +Sample subroutine name overrides +These options cause the old FreeRADIUS v3 default subroutine +names to be used Control which attribute lists are replaced following calls to @@ -105,14 +119,10 @@ $RAD_PERLCONF{'sub-config'}->{'name'} perl { filename = ${modconfdir}/${.:instance}/example.pl perl_flags = "-T" -# func_authenticate = authenticate -# func_authorize = authorize -# func_preacct = preacct -# func_accounting = accounting -# func_pre_proxy = pre_proxy -# func_post_proxy = post_proxy -# func_post_auth = post_auth # func_detach = detach +# func_recv_access_request = authorize +# func_recv_accounting_request = preacct +# func_send = postauth replace { # request = no # reply = no