Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

plack::middleware::recursive(3pm) [debian man page]

Plack::Middleware::Recursive(3pm)			User Contributed Perl Documentation			 Plack::Middleware::Recursive(3pm)

NAME
Plack::Middleware::Recursive - Allows PSGI apps to include or forward requests recursively SYNOPSIS
# with Builder enable "Recursive"; # in apps my $res = $env->{'plack.recursive.include'}->("/new_path"); # Or, use exceptions my $app = sub { # ... Plack::Recursive::ForwardRequest->throw("/new_path"); }; DESCRIPTION
Plack::Middleware::Recursive allows PSGI applications to recursively include or forward requests to other paths. Applications can make use of callbacks stored in "$env->{'plack.recursive.include'}" to include another path to get the response (whether it's an array ref or a code ref depending on your application), or throw an exception Plack::Recursive::ForwardRequest anywhere in the code to forward the current request (i.e. abort the current and redo the request). EXCEPTIONS
This middleware passes through unknown exceptions to the outside middleware stack, so if you use this middleware with other exception handlers such as Plack::Middleware::StackTrace or Plack::Middleware::HTTPExceptions, be sure to wrap this so Plack::Middleware::Recursive gets as inner as possible. AUTHORS
Tatsuhiko Miyagawa Masahiro Honma SEE ALSO
Plack Plack::Middleware::HTTPExceptions The idea, code and interface are stolen from Rack::Recursive and paste.recursive. perl v5.14.2 2011-06-22 Plack::Middleware::Recursive(3pm)

Check Out this Related Man Page

Plack::Middleware::StackTrace(3pm)			User Contributed Perl Documentation			Plack::Middleware::StackTrace(3pm)

NAME
Plack::Middleware::StackTrace - Displays stack trace when your app dies SYNOPSIS
enable "StackTrace"; DESCRIPTION
This middleware catches exceptions (run-time errors) happening in your application and displays nice stack trace screen. The stack trace is also stored in the environment as a plaintext and HTML under the key "plack.stacktrace.text" and "plack.stacktrace.html" respectively, so that middleware futher up the stack can reference it. This middleware is enabled by default when you run plackup in the default development mode. You're recommended to use this middleware during the development and use Plack::Middleware::HTTPExceptions in the deployment mode as a replacement, so that all the exceptions thrown from your application still get caught and rendered as a 500 error response, rather than crashing the web server. Catching errors in streaming response is not supported. CONFIGURATION
force enable "StackTrace", force => 1; Force display the stack trace when an error occurs within your application and the response code from your application is 500. Defaults to off. The use case of this option is that when your framework catches all the exceptions in the main handler and returns all failures in your code as a normal 500 PSGI error response. In such cases, this middleware would never have a chance to display errors because it can't tell if it's an application error or just random "eval" in your code. This option enforces the middleware to display stack trace even if it's not the direct error thrown by the application. no_print_errors enable "StackTrace", no_print_errors => 1; Skips printing the text stacktrace to console ("psgi.errors"). Defaults to 0, which means the text version of the stack trace error is printed to the errors handle, which usually is a standard error. AUTHOR
Tokuhiro Matsuno Tatsuhiko Miyagawa SEE ALSO
Devel::StackTrace::AsHTML Plack::Middleware Plack::Middleware::HTTPExceptions perl v5.14.2 2011-07-08 Plack::Middleware::StackTrace(3pm)
Man Page