From: Alan T. DeKok Date: Fri, 15 Sep 2023 12:44:25 +0000 (-0400) Subject: note "please don't use %{expr:..}" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=301033d139d917b7fd9593f9c10160dec6948dc4;p=thirdparty%2Ffreeradius-server.git note "please don't use %{expr:..}" --- diff --git a/doc/antora/modules/reference/pages/xlat/builtin.adoc b/doc/antora/modules/reference/pages/xlat/builtin.adoc index e10748666a3..a55eec14349 100644 --- a/doc/antora/modules/reference/pages/xlat/builtin.adoc +++ b/doc/antora/modules/reference/pages/xlat/builtin.adoc @@ -1019,12 +1019,16 @@ not bob! === +%(expr:)+ Evaluates the string as an xref:reference:unlang/expression.adoc[Unlang expression], and returns the result. Please see the -xref:reference:unlang/expression.adoc[Unlang expression] page for full -documentation on expressions. +xref:reference:unlang/expression.adoc[Unlang expression] page for full documentation on expressions. + +[NOTE] +==== +You probably don't want to use this. In v4, the main use of `%{expr:...}` is inside of strings which can't be split into actual expressions. +==== .Return: _data_ -.Example: +.Example [source,unlang] ---- @@ -1041,6 +1045,15 @@ update reply 3 ``` +.A Better example of not using `%{expr:...}` + +[source,unlang] +---- +&Tmp-String-0 := 1 + 2 +---- + + + === +%(nexttime: