[Mimedefang] Does MIMEdefang 'remember' variable values between successive invocations?
David F. Skoll
dfs at roaringpenguin.com
Tue Sep 6 16:51:25 EDT 2011
On Tue, 06 Sep 2011 22:45:20 +0200
"Rolf E. Sonneveld" <R.E.Sonneveld at sonnection.nl> wrote:
> If this is as designed, then what is the best way to reset/undefine
> these variables? Is it just: redefine with empty string?
It's best not to use too many global variable. (I know that's a funny
statement coming from the author of MIMEDefang, but hey... everyone makes
youthful mistakes...)
If you must use global variables, I recommend defining a function
like this:
use vars qw($GlobalVar1 $GlobalVar2); #etc
sub init_global_variables
{
$GlobalVar1 = undef;
$GlobalVar2 = undef;
}
Instead of "undef", use whatever initial value makes sense. In fact,
MIMEDefang has an internal "init_globals" function that does something
like this.
Then be sure to call init_global_variables where appropriate.
Regards,
David.
More information about the MIMEDefang
mailing list