[Jifty-commit] r3469 - jifty/trunk/lib/Jifty/View/Declare

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Jun 12 18:56:44 EDT 2007


Author: clkao
Date: Tue Jun 12 18:56:44 2007
New Revision: 3469

Modified:
   jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm

Log:
Fix jifty->web->out from without td used with mason wrapper.

Modified: jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm	Tue Jun 12 18:56:44 2007
@@ -21,11 +21,14 @@
         my $code = shift;
 
         # so in td handler, we made jifty::web->out appends to td
-        # buffer, we need it back for here someday we need to finish
-        # fixing the output system that is in Jifty::View.
+        # buffer, we need it back for here before we call $code.
+        # someday we need to finish fixing the output system that is
+        # in Jifty::View.
+        my $td_out = \&Jifty::Web::out;
         local *Jifty::Web::out = sub { shift->mason->out(@_) };
 
         local *HTML::Mason::Request::content = sub {
+            local *Jifty::Web::out = $td_out;
             $code->();
             my $content = Template::Declare->buffer->data;
             Template::Declare->buffer->clear;
@@ -33,7 +36,7 @@
         };
 
         Jifty->handler->fallback_view_handler->show('/_elements/wrapper');
-        }
+    }
 }
 
 =cut


More information about the Jifty-commit mailing list