From 4043f9681bc177aa9ba86effd589c7cccf4b6783 Mon Sep 17 00:00:00 2001 From: David Baird Date: Thu, 3 Nov 2005 17:12:37 +0000 Subject: [PATCH] Moved a couple methods git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@406 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole.pm | 72 +++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 71e0161..cd9ec49 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -697,39 +697,6 @@ sub send_output { -=item redirect_request - -Sets output headers to redirect based on the arguments provided - -Accepts either a single argument of the full url to redirect to, or a hash of -named parameters : - -$r->redirect_request('http://www.example.com/path'); - -or - -$r->redirect_request(protocol=>'https', domain=>'www.example.com', path=>'/path/file?arguments', status=>'302', url=>'..'); - -The named parameters are protocol, domain, path, status and url - -Only 1 named parameter is required but other than url, they can be combined as -required and current values (from the request) will be used in place of any -missing arguments. The url argument must be a full url including protocol and -can only be combined with status. - -=cut - -sub redirect_request { - die "redirect_request is a virtual method. Do not use Maypole directly; use Apache::MVC or similar"; -} - -=item redirect_internal_request - -=cut - -sub redirect_internal_request { - -} =back @@ -1034,6 +1001,45 @@ will be an array reference. Alias for C. +=back + +=head3 Utility methods + +=item redirect_request + +Sets output headers to redirect based on the arguments provided + +Accepts either a single argument of the full url to redirect to, or a hash of +named parameters : + +$r->redirect_request('http://www.example.com/path'); + +or + +$r->redirect_request(protocol=>'https', domain=>'www.example.com', path=>'/path/file?arguments', status=>'302', url=>'..'); + +The named parameters are protocol, domain, path, status and url + +Only 1 named parameter is required but other than url, they can be combined as +required and current values (from the request) will be used in place of any +missing arguments. The url argument must be a full url including protocol and +can only be combined with status. + +=cut + +sub redirect_request { + die "redirect_request is a virtual method. Do not use Maypole directly; use Apache::MVC or similar"; +} + +=item redirect_internal_request + +=cut + +sub redirect_internal_request { + +} + + =item make_random_id returns a unique id for this request can be used to prevent or detect repeat -- 2.39.5