More additions to unlang

Alan DeKok aland at deployingradius.com
Fri May 17 14:33:13 CEST 2013


Jakob Hirsch wrote:
> So it seem there's quite a lot of good stuff coming :)

  Yeah.

> Btw, if you are still looking for more ideas, what about this:
> 
> - ternary logic, like C's "condition ? yes : no"

  That's hard.  Mostly because the configuration file parser is bad.

> Not sure how easy this is to parse, though. Maybe something like
> "%{cond ? true : false}" would be better.

  Hmm... that may be easier to do.

> - regex-like comparison operators
> E.g. =^ and =$ would be true if the LHS starts/ends with the RHS string.
> I.e.,
> 
> ( "foobar" =^ "foo") -> true
> ( "foobar" =^ "bar") -> false
> ( "foobar" =$ "foo") -> false
> ( "foobar" =$ "bar") -> true
> 
> This would elimate the need for a lot of regex matches.

  Sure... but regex matches work for now.

  Alan DeKok.


More information about the Freeradius-Devel mailing list