[Jifty-commit] r3991 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Aug 26 17:34:04 EDT 2007
Author: sterling
Date: Sun Aug 26 17:34:04 2007
New Revision: 3991
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Continuation.pm
Log:
r8824 at riddle: andrew | 2007-08-20 15:57:13 -0500
Undoing previous accidental patch to Jifty::Continuation because I have not finished proofing it.
Modified: jifty/trunk/lib/Jifty/Continuation.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Continuation.pm (original)
+++ jifty/trunk/lib/Jifty/Continuation.pm Sun Aug 26 17:34:04 2007
@@ -14,10 +14,6 @@
re-visit that context later by providing the continuation again.
Continuations are stored on the user's session.
-A common use of a continuation is to perform a tangent/return in Jifty. For example, if you visit a page that you must be logged in to see, a Jifty application could present a link labeled "Click here to login." That link would be a "L<Jifty::Manual::Glossary/tangent>," which creates a continuation as part of the process of taking you to the login page. After you login, the application may perform a "L<Jifty::Manual::Glossary/return>," which calls the continuation stored by the tangent and returns you to the original page, but this time you are logged in.
-
-Almost any time you need to save the state for later recall, continuations can come in handy.
-
Continuations store a L<Jifty::Request> object and the
L<Jifty::Response> object for the request. They can also store
arbitrary code to be run when the continuation is called.
@@ -91,7 +87,6 @@
my $class = shift;
my $self = bless { }, $class;
- # Setup some nice defaults
my %args = (
parent => Jifty->web->request->continuation,
request => Jifty::Request->new(),
@@ -148,12 +143,13 @@
=head2 call
-Call the continuation; this is generally done during request processing, after
-actions have been run. L<Jifty::Request::Mapper>-controlled values are filled
-into the stored request based on the current request and response. During the
-process, another continuation is created, with the filled-in results of the
-current actions included, and the browser is redirected to the proper path,
-with that continuation.
+Call the continuation; this is generally done during request
+processing, after actions have been run.
+L<Jifty::Request::Mapper>-controlled values are filled into the stored
+request based on the current request and response. During the
+process, another continuation is created, with the filled-in results
+of the current actions included, and the browser is redirected to the
+proper path, with that continuation.
=cut
@@ -161,13 +157,11 @@
my $self = shift;
Jifty->log->debug("Redirect to @{[$self->request->path]} via continuation");
-
- # web services should do an internal redirect rather than an HTTP redirect
if (Jifty->web->request->argument('_webservice_redirect')) {
+ # for continuation - perform internal redirect under webservices.
Jifty->web->webservices_redirect($self->request->path);
- return;
+ return;
}
-
# If we needed to fix up the path (it contains invalid
# characters) then warn, because this may cause infinite
# redirects
More information about the Jifty-commit
mailing list