procmail
[Top] [All Lists]

Re: varname=| construct broken?

2004-02-20 15:14:00
On Fri, Feb 20, 2004 at 02:57:55PM -0700, Ian D. wrote:
I think I originally had my assignment inside the block of a copy and
then tried to use the variable later, but I guess the scope of the
variable is just that block.  I then turned on verbose and noticed the
assignment appeared to be null, so I simplified my case to demonstrate
the null assignment in the log when in fact my problem was the scoping
issue.  The logs are quite misleading.  Sorry to have wasted your time.

Well, I don't think anybody's time has been wasted, fwiw.  It's incorrect
to say that the var is not persistent beyond the nested block in which
you might have created it.  In procmail, vars, once created, are "global."
It's a flat language.

The point was stated well enough by Bart.  The VAR|program syntax
on the action line will not always work for specific compiles of
the program.  This is a known bug, and can indeed be dangerous
(random memory destruction).

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail