From: Nick Porter Date: Mon, 19 May 2025 11:18:58 +0000 (+0100) Subject: Overview of new Perl attribute list access / manipulation in upgrade doc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1677cbfc5fa8deea08a73bb89b8f07c732adcc56;p=thirdparty%2Ffreeradius-server.git Overview of new Perl attribute list access / manipulation in upgrade doc --- diff --git a/doc/antora/modules/howto/pages/installation/upgrade.adoc b/doc/antora/modules/howto/pages/installation/upgrade.adoc index 65ac39791a4..5f9842430d9 100644 --- a/doc/antora/modules/howto/pages/installation/upgrade.adoc +++ b/doc/antora/modules/howto/pages/installation/upgrade.adoc @@ -905,6 +905,22 @@ data, instead of as hex strings. All data received from the network is marked `tainted` by default. +Rather than using the global hashes `%RAD_REQUEST` etc, Perl subroutines +called by FreeRADIUS during packet processing are passed a hash ref +representing the packet being processed. + +This hash ref contains four hashes representing the attribute lists. + +Manipulating the values of attributes is now done directly from the +Perl subroutines e.g. + +``` +$p->{'reply'}{'foo'}[0] = 'baa' +``` + +Will set the value of `reply.foo` to `"baa"`, creating the pair if +needed. + === rlm_python Rather than passing a tuple representing attributes in the `request`