"foreach", was (Re: regex matching can be convinced to be TRUE if you're insistive enough?)

Alan DeKok aland at deployingradius.com
Wed Jun 8 13:41:35 CEST 2011

Brian Candler wrote:
> Very neat, thank you. This sort of iteration for vendor attributes like
> Cisco-AVPair is extremely helpful.
> The key operations will be things like:
> 1. replace the (current iteration) attribute

  Uh... right.

> 2. delete the (current iteration) attribute


> You can do these already, more or less, using
> foreach reply:Foo {
>    update reply {
>        Foo -= "%{Foreach-Variable-0}"
>        Foo += "replacement value"
>    }
> }
> That is, it will be fine unless you have multiple attributes with identical
> values.

  Yes.  Remember, "unlang" is not a language.  I am very wary of making
it a language.

  Alan DeKok.

More information about the Freeradius-Devel mailing list