On Jul 02, 2009 at 18:53, Juha Heinanen <jh(a)tutpro.com> wrote:
Andrei Pelinescu-Onciul writes:
if i
write in my script somewhere
$avp("fd") = "foo";
and in some other place reference $fd, how can double lookup during
runtime be avoided?
At fixup time $fd is looked-up. If it's a pvar is replaced with a pv
spec. If it's not with an avp spec.
ok. does this fixup happen also when $fd is used in an expression, like
$var(foo) = $fd;
Yes.
if i write
lookup_domain("$fd", "$fd");
the first $fd must be an avp, because lookup_domain expects an avp name
as first param and the second could be either a pvar or avp, but that
can be determined at fixup time.
That does not work right now, but it would be very easy to make it work.
Andrei