[Jifty-commit] r1038 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri May 12 16:15:33 EDT 2006


Author: alexmv
Date: Fri May 12 16:14:54 2006
New Revision: 1038

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Continuation.pm
   jifty/trunk/lib/Jifty/Dispatcher.pm
   jifty/trunk/lib/Jifty/Request.pm
   jifty/trunk/lib/Jifty/Web.pm

Log:
 r12966 at zoq-fot-pik:  chmrr | 2006-05-12 16:14:48 -0400
  * Remove confusing, undocumented, and unnecessary 'next_show'


Modified: jifty/trunk/lib/Jifty/Continuation.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Continuation.pm	(original)
+++ jifty/trunk/lib/Jifty/Continuation.pm	Fri May 12 16:14:54 2006
@@ -214,13 +214,7 @@
         # Enter the request in the continuation, and handle it
         Jifty->web->request(Clone::clone($self->request));
         Jifty->web->handle_request();
-
-        # Now we want to skip the rest of the
-        # Jifty::Web->handle_request that we were called from.  Pop up
-        # to the dispatcher
-        Jifty::Dispatcher::next_show();
     }
-
 }
 
 =head2 delete

Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm	Fri May 12 16:14:54 2006
@@ -213,11 +213,6 @@
 
 Redirect to another URI.
 
-
-=head2 next_show
-
-INTERNAL MAGIC YOU SHOULD NOT USE THAT ALEX SHOULD RENAME ;)
-
 =cut
 
 our @EXPORT = qw<
@@ -501,7 +496,6 @@
 
     die "LAST RULE"; 
 }
-sub next_show { last HANDLE_WEB }
 
 =head2 _do_under
 
@@ -698,7 +692,6 @@
     request->path($path);
     $self->render_template(request->path);
 
-
     last_rule;
 }
 

Modified: jifty/trunk/lib/Jifty/Request.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Request.pm	(original)
+++ jifty/trunk/lib/Jifty/Request.pm	Fri May 12 16:14:54 2006
@@ -435,7 +435,9 @@
 =head2 call_continuation
 
 Calls the L<Jifty::Continuation> associated with this request, if
-there is one.
+there is one.  Returns true if the continuation was called
+successfully -- if calling the continuation requires a redirect, this
+function will throw an exception to its enclosing dispatcher.
 
 =cut
 
@@ -446,6 +448,7 @@
     $self->log->debug("Calling continuation $cont");
     $self->continuation(Jifty->web->session->get_continuation($cont));
     $self->continuation->call;
+    return 1;
 }
 
 =head2 path

Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm	(original)
+++ jifty/trunk/lib/Jifty/Web.pm	Fri May 12 16:14:54 2006
@@ -281,8 +281,8 @@
     }
     $self->session->set_cookie();
 
-    $self->request->call_continuation
-        if $self->response->success;
+    # If there's a continuation call, don't do the rest of this
+    return if $self->response->success and $self->request->call_continuation;
 
     $self->redirect if $self->redirect_required;
     $self->request->do_mapping;


More information about the Jifty-commit mailing list