New feature in v3: cast!

Matthew Newton mcn4 at
Mon May 13 15:50:48 CEST 2013

On Mon, May 13, 2013 at 09:16:31AM -0400, Alan DeKok wrote:
>   I think the "getting rid of update sections" above is a good reason to
> keep using "&" for attribute references.  In that case, the rules are
> pretty simple.

'update' sections have been a pain in the past, but with the new
ability to update multiple things in one section, it's much
better. It does separate 'unlang' from most languages, and makes
it look more like a configuration than a program. As much as
removing/depracating it seems good (and I agree it is more usual
for programmers), I'm not sure it's the best thing for a
configuration language.

> - & is an attribute reference (except it can be omitted on the LHS for
> backwards compatibility)
> - everything else is type-specific
>   - strings MUST be quoted

Coming in on this party a bit late -

I'm slightly struggling to see why the new '&' is needed. I'm
probably being a bit slow!



is a string, but why not:


rather than



This at least keeps things the same as before. For example, in

  $a = "hello";
  ${a} = "hello";

are the same (and, indeed, the latter is required to disambiguate
when putting in a string, such as "foo${a}bar").

So what is the difference between

  &User-Name := "prefix%{User-Name}"


  %{User-Name} := "prefix%{User-Name}"

apart from the latter is slightly longer to type, of course!


  "%{User-Name}" := "prefix%{User-Name}"

is wrong, of course.

>   Catching errors on startup is preferable to catching them at run-time.




Matthew Newton, Ph.D. <mcn4 at>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at>

More information about the Freeradius-Devel mailing list