autoflush behavior for subrequests

Dave Rolsky <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
So in fixing a bug related to this I realized that there are cases where
the behavior of a subrequest with autoflush (or when it calls
flush_buffer) really isn't well defined.

There are two questions to consider:

1. Should a subreauest which calls $self->flush_buffer be flushing the
   parent request?

Right now it does, but I'm not sure that's right.  Maybe the subrequest
should really be isolated if the parent does not have autoflush on.

2. Given a parent with autoflush on, and a subreq which explicitly turns
   it off, what do we expect to happen?  Right now the output gets flushed
   anyway, because the child's default out_method will end up calling
   print() on the parent, which will then flush.

Is this correct?  Again, if the subrequest should be totally isolated then
it's not correct.


The fix for these would be to not call print() on the parent from the
subrequest.  Instead we'd have to ignore out_method for subrequests, and
just have their first buffer be a child of the parent object's last
buffer.


-dave

/*===========================
VegGuide.Org
Your guide to all that's veg.
===========================*/


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.