how would i go about retrieving (mod_perl or otherwise) the name
of the immediate calling handler of the current handler being
executed?

i'm trying to do loop checking in which a given handler may need
to be executed as a result of multiple subrequests, but never back
to back.

e.g.:

# httpd.conf ... 

# mod_transform uses an output filter to trap the content of a response
# it lives at http://www.outoforder.cc/projects/apache/mod_transform/docs/
LoadModule transform_module modules/mod_transform.so

# Apache::MyStuff cleans up uri->filename stuff 
<Location /foo>
PerlTypeHandler Apache::MyStuff
AddOutputFilter XSLT .xml
</Location>

so, the scenario here is that mod_transform needs to subrequest its
external entities. these external entities need to be able to run
once through the type handler, but only once, as the type handler
will loop indefinitely. the timeline goes as such:

* request comes in from a browser, or possibly a subrequest.

* Apache::MyStuff examines uri.

* Apache::MyStuff may run a lookup_uri here or there (these do not trigger 
  Apache::MyStuff's handler because some sort of state is set).

* http_core (or whatever) serves up a resource, probably xml.

* if it's xml, mod_transform picks up and starts trying to dereference 
  the external entities using its filter to trap the output.

* as entities are being dereferenced, Apache::MyStuff is called once again 
  as if the subrequest lookup generated by the entity dereference
  was an external request.

so anyway, what i'm trying to figure out is how to set a state in
a handler temporarily, so that subrequests spawned from it and it
only do not cause it to recurse, but if it's invoked as a subrequest
or internal redirect from another handler, it does its job.

if anyone can suggest anything, i'd be greatly appreciative.

thanks

.d

Reply via email to