Hi Kevin,

Maybe I'm missing something, but what's preventing you from creating
another hash (scoped with 'my' so that it doesn't exist for the next
request) that you use for each request to track the words already
tagged on the page? 

Chris

* Kevin Ward ([EMAIL PROTECTED]) [991105 08:49]:
> 
> Hi,
> 
> Let me explain what I am working on:
> 
> I have written an Apache module (which I am calling Glossary) which, when
> it receives a page request, highlights terms in the page which are found in
> an online glossary.  This way a user can click on the highlighted term and
> go view the description.
> 
> All of the terms and cross-references, besides being stored in a database,
> are included in a tab-separated text file.  When a page is requested, the
> module reads the text file into a hash.  It then goes through the page and
> links those terms found in the hash.  This part is working very well right
> now, however, here is the catch.
> 
> I want to make it so that it only highlights the first instance of a term
> in a page, so what I did was to delete the term from the hash after it has
> been highlighted.  But this is having the inconsistent problem of not
> always highlighting all of the terms on subsequent requests and it seems
> that only restarting the httpd will truly reset everything. I am assuming
> that this is because the hash state is remaining in its altered state when
> another page is requested.
> 
> So, my question is: How can I make certain that the hash is reset for each
> page request? Is there a way to make this hash local to the individual
> child process which serves up the specific page?  Is there a better way to
> go about this?
> 
> Kevin

Reply via email to