X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=cd9ec49951099656ed7325290a5f9dcf1f020a22;hb=4043f9681bc177aa9ba86effd589c7cccf4b6783;hp=71e01615ed859d55a662fccb0dbb75cfce3c69ff;hpb=ad24ffc85f25a9b73a28cd326c3b3caea234adbf;p=maypole.git 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