[Jifty-commit] r645 -

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Mar 3 19:02:13 EST 2006


Author: jesse
Date: Fri Mar  3 19:02:12 2006
New Revision: 645

Modified:
   /   (props changed)
   jifty/trunk/lib/Jifty/Web/PageRegion.pm

Log:
 r25142 at truegrounds:  jesse | 2006-03-03 09:18:20 -0800
 * PageRegions were resetting the Jifty out method and never setting it 
   back to the one we needed. This made subsequent requests never...send 
   content to the outside world...unless we reset the MasonHandler on each
   request. And my gods did that hurt performance ;)


Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm	Fri Mar  3 19:02:12 2006
@@ -275,12 +275,14 @@
     $subrequest->is_subrequest( 1 );
     local Jifty->web->{request} = $subrequest;
 
-    # Convince Mason to tack its response onto a variable and not send
+    # While we're inside this region, 
+    # have Mason to tack its response onto a variable and not send
     # headers when it does so
-    Jifty->handler->mason->interp->out_method( sub { $result .= $_[0]; });
+    # XXX TODO: this internals diving is icky
+    local Jifty->handler->mason->interp->{'out_method'} = \$result;
 
     # Call into the dispatcher
-    Jifty->dispatcher->handle_request;
+     Jifty->dispatcher->handle_request;
 
     if ($self->region_wrapper) {
         $result .= qq|</div>|;


More information about the Jifty-commit mailing list