summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2010-06-17 00:15:11 -0400
committerJason Woodward2010-06-17 00:15:11 -0400
commit828c70a25aa47a6a55ddb92cec6b2d37d1b72e85 (patch)
tree156d31dc7b11649f5453b51b9059d540d4e3e48e
parent71112d96048ced2932e7f7e95d6e47e8776d7017 (diff)
downloadJaos-WebApp-828c70a25aa47a6a55ddb92cec6b2d37d1b72e85.tar.gz
added redirect_external to ::Controller
-rw-r--r--Changes3
-rw-r--r--lib/Jaos/WebApp/Controller.pm11
2 files changed, 13 insertions, 1 deletions
diff --git a/Changes b/Changes
index 9a6521d..80e6ce9 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
-0.3 June 16, 2010
+0.3 June 17, 2010
+ * added redirect_external to ::Controller
* auto set the secure cookie flag if using SSL
* updated error reporting when loading packages or dispatching
* added alias for req->upload to ::Controller
diff --git a/lib/Jaos/WebApp/Controller.pm b/lib/Jaos/WebApp/Controller.pm
index b3cd713..422784e 100644
--- a/lib/Jaos/WebApp/Controller.pm
+++ b/lib/Jaos/WebApp/Controller.pm
@@ -50,6 +50,13 @@ sub redirect_to
$self->{app}->res->redirect($uri);
}
+sub redirect_external
+{
+ my ($self, $destination) = @_;
+ $self->app->log->debug("Redirecting to $destination");
+ $self->{app}->res->redirect($destination);
+}
+
sub encode_html
{
@@ -136,6 +143,10 @@ Dispatch to the specified render type handler. Each handler is registered with
Redirects to the specified location. url_for is called internally for generating the full path to the mounted location. This is a slight wrapper around L<Plack::Response>->redirect().
+=head2 redirect_external
+
+Redirects to the specified external location. This is a wrapper around L<Plack::Response>->redirect().
+
=head2 encode_html
=head2 decode_html