Thanks for the advice, and you're right -- there are no nested sub. I thought maybe mod-perl mangled it somehow to make one.
I thought CGI stuff was made safe using Registry? What should be used in this case, instead, then?

Also, one of Apache::Registry's shortcomings was a confusing and somewhat incomplete approach to sharing variables among sessions. Since the code is cached, the variables aren't automatically re-initialized each time the script is run. This might solve your problem:

That patch, Apache::ChildExit, is still on CPAN. I don't have much time to consider your question. But I generally post this answer when I see problems with Apache::Registry.

How would this cause data duplication or stale data or data from previous session/request leaking through to a new one? Cause it wouldn't you know, its pretty much guaranteed to have nothing to do with it