[Mimedefang] Does MIMEdefang 'remember' variable values between successive invocations?
Rolf E. Sonneveld
R.E.Sonneveld at sonnection.nl
Tue Sep 6 18:08:12 EDT 2011
On 9/6/11 10:51 PM, David F. Skoll wrote:
> 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.
thanks for the recommendations, David.
More information about the MIMEDefang