durusmail: quixote-users: Re: publisher difficult to modify for sessions
publisher difficult to modify for sessions
2005-09-09
Re: publisher difficult to modify for sessions
2005-09-09
2005-09-12
Re: publisher difficult to modify for sessions
Evan Laforge
2005-09-09
I wrote too quickly.

What I'm trying to do really looks like this, where the *s mark my
code, and the rest is standard quixote.

start_request (parse form vars, etc.)

* save data

process request
get output from failed request

* dump data

save session if successful

return output


So I'm trying to isolate the request->output function and put an
around-method on it.  Unfortunately, it's hard to do that because
quixote looks like:

parse request
  request->output
  save session if successful
get output (generate if not successful)
return output

So the output generating stuff is spread over two methods.  It looks
like the easiest way to do what I want is copy and paste try_publish
and put my code around the root_directory._q_traverse, and copy and
paste the finish_*_request logic if the _q_traversed raised an
exception.

Otherwise I'd have to restructure the publisher more radically, and it
would probably just make it inconvenient for someone else.

Meh.  Ideas?  I may try a patch anyway to see if I can't get the logic
broken down in a way that makes more sense to me.  The quixote
publisher's order and method divisions, though simple, somehow
confuses me every time I want to do something with it.
reply