New feature in v3: cast!

Matthew Newton mcn4 at leicester.ac.uk
Tue May 14 13:04:15 CEST 2013


On Mon, May 13, 2013 at 12:36:48PM -0400, Alan DeKok wrote:
>   The %{...} is verbose (IMHO).  Plus, the xlat API is *completely*
> separated from the conditional parser.  So exposing the internals of
> xlat to unlang requires some careful butchering of the code.
> 
>   Adding '&' was simpler.  And is prettier.
> 
> > So what is the difference between
> > 
> >   &User-Name := "prefix%{User-Name}"
> > 
> > and
> > 
> >   %{User-Name} := "prefix%{User-Name}"
> > 
> > apart from the latter is slightly longer to type, of course!
> 
>   The first one requires no knowledge of the xlat internals.

Yeah, OK - agreed. It makes sense now.

 &User-Name for unlang attributes ("variables").

 %{...} for xlat expansions (which might contain attributes).

This is a good distinction.

Cheers,

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>

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

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


More information about the Freeradius-Devel mailing list