Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

NAME
Plack::Middleware::Lint - Validate request and response SYNOPSIS
use Plack::Middleware::Lint; my $app = sub { ... }; # your app or middleware $app = Plack::Middleware::Lint->wrap($app); # Or from plackup plackup -e 'enable "Lint"' myapp.psgi DESCRIPTION
Plack::Middleware::Lint is a middleware component to validate request and response environment formats. You are strongly suggested to use this middleware when you develop a new framework adapter or a new PSGI web server that implements the PSGI interface. This middleware is enabled by default when you run plackup or other launcher tools with the default environment development value. DEBUGGING
Because of how this middleware works, it may not be easy to debug Lint errors when you encounter one, unless you're writing a PSGI web server or a framework. For example, when you're an application developer (user of some framework) and see errors like: Body should be an array ref or filehandle at lib/Plack/Middleware/Lint.pm line XXXX there's no clue about which line of your application produces that error. We're aware of the issue, and have a plan to spit out more helpful errors to diagnose the issue. But until then, currently there are some workarounds to make this easier. For now, the easiest one would be to enable Plack::Middleware::REPL outside of the Lint middleware, like: plackup -e 'enable "REPL"; enable "Lint"' app.psgi so that the Lint errors are caught by the REPL shell, where you can inspect all the variables in the response. AUTHOR
Tatsuhiko Miyagawa Tokuhiro Matsuno SEE ALSO
Plack perl v5.14.2 2011-09-22 Plack::Middleware::Lint(3pm)

Check Out this Related Man Page

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

NAME
Plack::Middleware::LighttpdScriptNameFix - fixes wrong SCRIPT_NAME and PATH_INFO that lighttpd sets SYNOPSIS
# in your app.psgi use Plack::Builder; builder { enable "LighttpdScriptNameFix"; $app; }; # Or from the command line plackup -s FCGI -e 'enable "LighttpdScriptNameFix"' /path/to/app.psgi DESCRIPTION
This middleware fixes wrong "SCRIPT_NAME" and "PATH_INFO" set by lighttpd when you mount your app under the root path ("/"). If you use lighttpd 1.4.23 or later you can instead enable "fix-root-scriptname" flag inside "fastcgi.server" instead of using this middleware. CONFIGURATION
script_name Even with "fix-root-scriptname", lighttpd still sets weird "SCRIPT_NAME" and "PATH_INFO" if you mount your application at "" or something that ends with "/". Setting "script_name" option tells the middleware how to reconstruct the new correct "SCRIPT_NAME" and "PATH_INFO". If you mount the app under "/something/", you should set: enable "LighttpdScriptNameFix", script_name => "/something"; and when a request for "/something/a/b?param=1" comes, "SCRIPT_NAME" becomes "/something" and "PATH_INFO" becomes "/a/b". "script_name" option is set to empty by default, which means all the request path is set to "PATH_INFO" and it behaves like your fastcgi application is mounted in the root path. AUTHORS
Yury Zavarin Tatsuhiko Miyagawa SEE ALSO
Plack::Handler::FCGI <http://github.com/miyagawa/Plack/issues#issue/68> <https://redmine.lighttpd.net/issues/729> perl v5.14.2 2011-02-27 Plack::Middleware::LighttpdScriptNameFix(3pm)
Man Page