|go ahead... be a heretic|
Apache::Registry - shared variable?by DaisyLou (Acolyte)
|on Jun 20, 2013 at 14:25 UTC||Need Help??|
DaisyLou has asked for the
wisdom of the Perl Monks concerning the following question:
I have a script (several actually) that is run through Mod_Perl/Apache Registry and there seems to be variable sharing/leaking going on.
Without further ado here's the essence of the script...
I know that the first comment will be about the SQL stuff not being done the official way -- and you're be right, but there doesn't appear to be an issue with that.
The issue is that $list is sometimes correct, and other times has values appended to it that are from "another thread". Using DBI persistent connections.
It appears as though this may be the issue: http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my____Scoped_Variable_in_Nested_Subroutines
I've read it, but don't understand it. I've tried changing "my" to "our local", no luck.
Any recommendations on how to solve this quickly and easily are really appreciated!