[Jifty-commit] r6270 - in jifty/trunk: lib/Jifty/Web

Jifty commits jifty-commit at lists.jifty.org
Sat Jan 24 19:39:54 EST 2009


Author: alexmv
Date: Sat Jan 24 19:39:52 2009
New Revision: 6270

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

Log:
 r41210 at kohr-ah:  chmrr | 2009-01-24 19:39:48 -0500
 as_string shouldn't call ->enter or ->exit


Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm	Sat Jan 24 19:39:52 2009
@@ -273,7 +273,7 @@
 sub as_string {
     my $self = shift;
     Jifty->handler->buffer->push(private => 1, from => "PageRegion render of ".$self->path);
-    $self->render;
+    $self->make_body;
     return Jifty->handler->buffer->pop;
 }
 
@@ -288,6 +288,20 @@
     my $self = shift;
 
     $self->enter;
+    $self->make_body;
+    $self->exit;
+
+    return '';
+}
+
+=head2 make_body
+
+Outputs the results of the region to the current buffer.
+
+=cut
+
+sub make_body {
+    my $self = shift;
     my $buffer = Jifty->handler->buffer;
 
     my %arguments = %{ $self->arguments };
@@ -328,9 +342,6 @@
 
     $self->render_as_subrequest(\%arguments);
     $buffer->append(qq|</div>|) if ( $self->region_wrapper );
-
-    $self->exit;
-    return '';
 }
 
 =head2 render_as_subrequest


More information about the Jifty-commit mailing list