[sr-dev] replacing k pvars with s selects
Daniel-Constantin Mierla
miconda at gmail.com
Fri Jul 3 18:45:59 CEST 2009
On 07/03/2009 06:36 PM, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
> > whose confusion?
>
> like the discussion on lookup_domain function revealed, it is confusing
> that the same prefix ($ char) is used for two different things.
>
from my point of view, all are script variables: avps, references to sip
message parts, etc ... therefore the have to start with same char, and
most of the programming languages use $ for that. It is what was decided
long time ago in openser when pseudo-variables were introduced in core.
Basically, there are classes of script variables, some accepting dynamic
names (like avps $avp(...), headers $hdr(...), private $var(...) and
shared variables $sht(...) a.s.o.).
I do not see reason for a special character for certain classes, like
avp or select. It is much much clearer to have:
$avp(name)
$sel(name)
rather than:
$name for avps
@name for selects
&name, %name etc. for what so ever variable class
Daniel
> > Lot of code and config depends on PV frameworks, so if you feel less
> > confused, just use select instead of PV, both are available, it is your
> > choice to use one of them. You can just not load pv module you have not
> > much to do with PVs.
>
> that indeed is a viable option.
>
> -- juha
>
--
Daniel-Constantin Mierla
http://www.asipto.com/
More information about the sr-dev
mailing list