We're in a similar situation.  I've found two ways of doing this.

1. Use $ENV{'UNIQUE_ID'}  (set my mod_unique_id?)
This seems to be a different value for every request.  So I can create 2
global variables, $lastId and %savedData.  If $lastId != $ENV{'UNIQUE_ID'}
then I know I'm in a new request and I can wipe out %savedData.

2. Use a global variable and clean it up at the end of each request using
"cleanup_register" from APR::Pool.  This is within an "if ($mod_perl)"
block, so it won't affect the mod_cgi script.

-Joe


On Fri, 22 Jul 2005, Simon Perreault wrote:

> On Friday 22 July 2005 10:27, Stas Bekman wrote:
> > $r->notes for strings
> > $r->pnotes for perl scalars
> 
> Thank you very much for your quick reply. I didn't know about those methods.
> 
> I should have mentioned that I am running under ModPerl::Registry and am 
> trying to keep my scripts free from any mod_perlism so that they can still be 
> run stand-alone. Is there still a solution?
> 


Reply via email to