On 19/02/2006, at 3:24 PM, Graham Dumpleton wrote:
Thus depending on what you are doing, you need one or the other. To
make it
obvious, should perhaps use a distinct method name to add handlers
as stacked
handlers against the current handler list. Thus:
def all(req):
req.add_stacked_handler("PythonHandler","page::header")
req.add_stacked_handler("PythonHandler","page::body")
req.add_stacked_handler("PythonHandler","page::footer")
return apache.OK
Hmmm, adding a stacked handler probably only makes sense for the current
phase. Thus, perhaps just:
def all(req):
req.add_stacked_handler("page::header")
req.add_stacked_handler("page::body")
req.add_stacked_handler("page::footer")
return apache.OK
or if overloading is allowed:
def all(req):
req.add_handler(None,"page::header")
req.add_handler(None,"page::body")
req.add_handler(None,"page::footer")
return apache.OK
That no phase is listed means the current phase is used and it would
be stacked.
Too obscure???
If you allowed an independent handler stack to be added, maybe you
need to
allow a list as an alternative of just the handler string.
def all(req):
req.add_handler("PythonHandler",
["page::header","page::body","page::footer"])
return apache.DECLINED
Rather not use a single string and have to split it.
Graham