You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by John Michael <jo...@acadiacom.net> on 2001/10/24 01:58:59 UTC

RE: newbie having problems

I had a routine in the beginning of the program to initialze my variable hash and query param like so:
######     initialize globals     ######################
foreach (keys %VAR){$VAR{$_} = "";}

I did this so that these variables would not propogate to other instances of the script.
This was causing the error. 
I removed it and added a this small sub:
sub clean_up {
undef %VAR;
Apache::exit();
}

Is this the correct way to do this or even necessary?
The Apache::exit() function is still causing an error, but the script runs and works but is evidently not exiting gracefully.
I am running under apache::perl envir.
Also, I am running the script in an eval{ } block in order to trap errors in the $@ variable.  
IS this ok practice in mod-perl?


Thanks
JM